Skip to content

Commit ce904a1

Browse files
authored
fix: empty array is valid api config (#2788)
* fix: empty array is valid api config * chore: revert weird api schema update * Update api.go
1 parent 2da3861 commit ce904a1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/config/api.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ func (a *api) ToUpdatePostgrestConfigBody() v1API.UpdatePostgrestConfigBody {
4444
}
4545

4646
// Convert ExtraSearchPath to a comma-separated string
47-
if len(a.ExtraSearchPath) > 0 {
48-
extraSearchPath := strings.Join(a.ExtraSearchPath, ",")
49-
body.DbExtraSearchPath = &extraSearchPath
50-
}
47+
body.DbExtraSearchPath = cast.Ptr(strings.Join(a.ExtraSearchPath, ","))
5148

5249
// Convert MaxRows to int pointer
5350
if a.MaxRows > 0 {

0 commit comments

Comments
 (0)