Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
deniseli committed May 25, 2024
1 parent 3741ac5 commit 88c711b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions backend/controller/dal/database_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ 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) {
configs, err := d.db.ListConfigs(ctx)
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{
Expand All @@ -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
Expand Down

0 comments on commit 88c711b

Please sign in to comment.