feat: return all fields from api_service objects

This commit is contained in:
2025-05-30 21:25:03 +02:00
parent 013f300513
commit 1ab4113040

View File

@ -3,16 +3,16 @@ INSERT INTO api_services (
client_id, client_secret, name, redirect_uris, scopes, grant_types client_id, client_secret, name, redirect_uris, scopes, grant_types
) VALUES ( ) VALUES (
$1, $2, $3, $4, $5, $6 $1, $2, $3, $4, $5, $6
) RETURNING id,client_id,name,redirect_uris,scopes,grant_types,created_at,updated_at,is_active; ) RETURNING *;
-- name: GetApiServiceCID :one -- name: GetApiServiceCID :one
SELECT id,client_id,name,redirect_uris,scopes,grant_types,created_at,updated_at,is_active FROM api_services SELECT * FROM api_services
WHERE client_id = $1 WHERE client_id = $1
AND is_active = true AND is_active = true
LIMIT 1; LIMIT 1;
-- name: ListApiServices :many -- name: ListApiServices :many
SELECT id,client_id,name,redirect_uris,scopes,grant_types,created_at,updated_at,is_active FROM api_services SELECT * FROM api_services
ORDER BY created_at DESC; ORDER BY created_at DESC;
-- name: UpdateApiService :one -- name: UpdateApiService :one
@ -24,7 +24,7 @@ SET
grant_types = $5, grant_types = $5,
updated_at = NOW() updated_at = NOW()
WHERE client_id = $1 WHERE client_id = $1
RETURNING id,client_id,name,redirect_uris,scopes,grant_types,created_at,updated_at,is_active; RETURNING *;
-- name: DeactivateApiService :exec -- name: DeactivateApiService :exec
UPDATE api_services UPDATE api_services