fix: api key mutations invalidate proper keys (#37467)

* fix: api key mutations invalidate proper keys

* Fix the RQ keys for API keys.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
This commit is contained in:
Stojan DimitrovskiandIvan Vasilov authored and GitHub committed 2025-07-25 17:47:44 +02:00
1 parent b215b982ef
commit 800d688d4c
2 files changed
+2 -2

No files matched your search

@@ -36,7 +36,7 @@ export async function createAPIKey(payload: APIKeyCreateVariables) {
? {
// secret_jwt_template: payload?.secret_jwt_template || null,
secret_jwt_template: {
role: 'service_role', // @mildtomato (Jonny) this should be default in API for type secret
role: 'service_role',
},
}
: name),
+1 -1
View File
@@ -1,6 +1,6 @@
export const apiKeysKeys = {
list: (projectRef?: string, reveal?: boolean) =>
['projects', projectRef, 'api-keys', reveal] as const,
['projects', projectRef, 'api-keys', reveal].filter(Boolean),
single: (projectRef?: string, id?: string) => ['projects', projectRef, 'api-keys', id] as const,
status: (projectRef?: string) => ['projects', projectRef, 'api-keys', 'legacy'] as const,
}