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

Function handleRevoke

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

Source from the content-addressed store, hash-verified

247 };
248
249 const handleRevoke = async (key: ApiKeySummary) => {
250 setRevokingId(key.id);
251 const exit = await doRevoke({ params: { apiKeyId: key.id }, reactivityKeys: apiKeyWriteKeys });
252 setRevokingId(null);
253 trackEvent("api_key_revoked", { success: Exit.isSuccess(exit) });
254 if (Exit.isSuccess(exit)) {
255 toast.success(`Revoked ${key.name}`);
256 return;
257 }
258 toast.error("Failed to revoke API key");
259 };
260
261 return (
262 <PageContainer>

Callers 2

ApiKeysPageFunction · 0.85
OrgApiKeysSectionBodyFunction · 0.85

Calls 2

trackEventFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected