diff --git a/pkg/config/api.go b/pkg/config/api.go index 403e290e5..cb94959a6 100644 --- a/pkg/config/api.go +++ b/pkg/config/api.go @@ -38,16 +38,10 @@ func (a *api) ToUpdatePostgrestConfigBody() v1API.UpdatePostgrestConfigBody { } // Convert Schemas to a comma-separated string - if len(a.Schemas) > 0 { - schemas := strings.Join(a.Schemas, ",") - body.DbSchema = &schemas - } + body.DbSchema = cast.Ptr(strings.Join(a.Schemas, ",")) // Convert ExtraSearchPath to a comma-separated string - if len(a.ExtraSearchPath) > 0 { - extraSearchPath := strings.Join(a.ExtraSearchPath, ",") - body.DbExtraSearchPath = &extraSearchPath - } + body.DbExtraSearchPath = cast.Ptr(strings.Join(a.ExtraSearchPath, ",")) // Convert MaxRows to int pointer if a.MaxRows > 0 {