Skip to content

Commit

Permalink
chore: minor style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge committed Oct 16, 2024
1 parent f5f960e commit bd4b42d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions pkg/config/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ func (a *api) ToUpdatePostgrestConfigBody() v1API.UpdatePostgrestConfigBody {

// When the api is disabled, remote side it just set the dbSchema to an empty value
if !a.Enabled {
emptyString := ""
body.DbSchema = &emptyString
body.DbSchema = cast.Ptr("")
return body
}

Expand All @@ -52,8 +51,7 @@ func (a *api) ToUpdatePostgrestConfigBody() v1API.UpdatePostgrestConfigBody {

// Convert MaxRows to int pointer
if a.MaxRows > 0 {
intValue := cast.UintToInt(a.MaxRows)
body.MaxRows = &intValue
body.MaxRows = cast.Ptr(cast.UintToInt(a.MaxRows))
}

// Note: DbPool is not present in the Api struct, so it's not set here
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ func (c *config) Load(path string, fsys fs.FS) error {
}
}
if err := base.Validate(fsys); err != nil {
return errors.Errorf("invalid remote config %s : %w", name, err)
return errors.Errorf("invalid remote config %s: %w", name, err)
}
c.Remotes[name] = base
}
Expand Down

0 comments on commit bd4b42d

Please sign in to comment.