refact(billing): Use sql functions instead of views
These functions will ensure that UTC time is used for billing queries, eliminating the need for the repository to set the timezone. This also means the repository no longern needs a writer.
This commit is contained in:
5 files changed
+27
-57
No files matched your search
@@ -451,7 +451,7 @@ func New(ctx context.Context, conf *Config) (*Controller, error) {
|
||||
return server.NewRepositoryStorage(ctx, dbase, dbase, c.kms)
|
||||
}
|
||||
c.BillingRepoFn = func() (*billing.Repository, error) {
|
||||
return billing.NewRepository(ctx, dbase, dbase)
|
||||
return billing.NewRepository(ctx, dbase)
|
||||
}
|
||||
|
||||
// Check that credentials are available at startup, to avoid some harmless
|
||||
|
||||
Reference in new issue
Block a user