完善 API Key 能力范围可视化和维护
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
UPDATE gateway_api_keys
|
||||
SET scopes = '["chat","embedding","rerank","image","video","music","audio"]'::jsonb,
|
||||
updated_at = now()
|
||||
WHERE deleted_at IS NULL
|
||||
AND (
|
||||
(scopes @> '["chat","image","video"]'::jsonb
|
||||
AND scopes <@ '["chat","image","video"]'::jsonb)
|
||||
OR
|
||||
(scopes @> '["chat","embedding","rerank","image","video"]'::jsonb
|
||||
AND scopes <@ '["chat","embedding","rerank","image","video"]'::jsonb)
|
||||
);
|
||||
Reference in New Issue
Block a user