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 authored and GitHub committed 2024-09-12 10:16:15 +00:00
1 parent c94f89610f
commit 64d5b74c12
7 files changed
+108 -24

No files matched your search

+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,
}
)