From 88c711b67fc17cc17b776c919116310ea1c79a4f Mon Sep 17 00:00:00 2001 From: Denise Li Date: Fri, 24 May 2024 23:39:56 -0400 Subject: [PATCH] lint --- backend/controller/dal/database_resolver.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/controller/dal/database_resolver.go b/backend/controller/dal/database_resolver.go index 6012898a16..66d4562d63 100644 --- a/backend/controller/dal/database_resolver.go +++ b/backend/controller/dal/database_resolver.go @@ -30,8 +30,8 @@ func (d DatabaseResolver) Get(ctx context.Context, ref configuration.Ref) (*url. if err != nil { return nil, configuration.ErrNotFound } - p := configuration.DBProvider{true} - return p.Store(ctx, ref, []byte(value)) + p := configuration.DBProvider{DB: true} + return p.Store(ctx, ref, value) } func (d DatabaseResolver) List(ctx context.Context) ([]configuration.Entry, error) { @@ -39,9 +39,9 @@ func (d DatabaseResolver) List(ctx context.Context) ([]configuration.Entry, erro if err != nil { return nil, translatePGError(err) } - p := configuration.DBProvider{true} + p := configuration.DBProvider{DB: true} return slices.Map(configs, func(c sql.Config) configuration.Entry { - ref := configuration.Ref{c.Module, c.Name} + ref := configuration.Ref{Module: c.Module, Name: c.Name} // err can be ignored because Store always returns a nil error u, _ := p.Store(ctx, ref, c.Value) return configuration.Entry{ @@ -52,7 +52,7 @@ func (d DatabaseResolver) List(ctx context.Context) ([]configuration.Entry, erro } func (d DatabaseResolver) Set(ctx context.Context, ref configuration.Ref, key *url.URL) error { - p := configuration.DBProvider{true} + p := configuration.DBProvider{DB: true} value, err := p.Load(ctx, ref, key) if err != nil { return err