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

Function handleRevoke

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

Source from the content-addressed store, hash-verified

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

Callers 1

OrgApiKeysSectionBodyFunction · 0.85

Calls 2

trackEventFunction · 0.90
errorMethod · 0.80

Tested by

no test coverage detected