diff --git a/internal/repository/api_services.sql.go b/internal/repository/api_services.sql.go index 94cc67f..f9d76a8 100644 --- a/internal/repository/api_services.sql.go +++ b/internal/repository/api_services.sql.go @@ -163,26 +163,29 @@ const updateApiService = `-- name: UpdateApiService :one UPDATE api_services SET name = $2, - redirect_uris = $3, - scopes = $4, - grant_types = $5, + description = $3, + redirect_uris = $4, + scopes = $5, + grant_types = $6, updated_at = NOW() WHERE client_id = $1 RETURNING id, client_id, client_secret, name, redirect_uris, scopes, grant_types, created_at, updated_at, is_active, description ` type UpdateApiServiceParams struct { - ClientID string `json:"client_id"` - Name string `json:"name"` - RedirectUris []string `json:"redirect_uris"` - Scopes []string `json:"scopes"` - GrantTypes []string `json:"grant_types"` + ClientID string `json:"client_id"` + Name string `json:"name"` + Description pgtype.Text `json:"description"` + RedirectUris []string `json:"redirect_uris"` + Scopes []string `json:"scopes"` + GrantTypes []string `json:"grant_types"` } func (q *Queries) UpdateApiService(ctx context.Context, arg UpdateApiServiceParams) (ApiService, error) { row := q.db.QueryRow(ctx, updateApiService, arg.ClientID, arg.Name, + arg.Description, arg.RedirectUris, arg.Scopes, arg.GrantTypes, diff --git a/queries/api_services.sql b/queries/api_services.sql index 5cb63bd..7b274a9 100644 --- a/queries/api_services.sql +++ b/queries/api_services.sql @@ -24,9 +24,10 @@ ORDER BY created_at DESC; UPDATE api_services SET name = $2, - redirect_uris = $3, - scopes = $4, - grant_types = $5, + description = $3, + redirect_uris = $4, + scopes = $5, + grant_types = $6, updated_at = NOW() WHERE client_id = $1 RETURNING *;