feat(api-key,js-sdk,dashboard): allow deleting api keys only once its revoked (#9118)

what:

- module only deletes api keys once its revoked
- disables ui elements


https://github.com/user-attachments/assets/437821ae-497e-4b59-b02c-4a6ff36e6a30

RESOLVES CC-106
RESOLVES CC-105
RESOLVES CC-104
This commit is contained in:
Riqwan Thamir
2024-09-12 10:16:15 +00:00
committed by GitHub
parent c94f89610f
commit 64d5b74c12
7 changed files with 108 additions and 24 deletions
+2 -2
View File
@@ -38,9 +38,9 @@ export class ApiKey {
async revoke(id: string, headers?: ClientHeaders) {
return await this.client.fetch<HttpTypes.AdminApiKeyResponse>(
`/admin/api-keys/${id}`,
`/admin/api-keys/${id}/revoke`,
{
method: "DELETE",
method: "POST",
headers,
}
)