MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / handleRevoke

Function handleRevoke

packages/react/src/pages/api-keys.tsx:91–101  ·  view source on GitHub ↗
(key: ApiKeySummary)

Source from the content-addressed store, hash-verified

89 };
90
91 const handleRevoke = async (key: ApiKeySummary) => {
92 setRevokingId(key.id);
93 const exit = await doRevoke({ params: { apiKeyId: key.id }, reactivityKeys: apiKeyWriteKeys });
94 setRevokingId(null);
95 trackEvent("api_key_revoked", { success: Exit.isSuccess(exit) });
96 if (Exit.isSuccess(exit)) {
97 toast.success(`Revoked ${key.name}`);
98 return;
99 }
100 toast.error("Failed to revoke API key");
101 };
102
103 const closeCreate = (open: boolean) => {
104 setCreateOpen(open);

Callers 1

ApiKeysPageFunction · 0.85

Calls 2

trackEventFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected