MCPcopy Create free account
hub / github.com/SwishHQ/spread / fetchAuthKeys

Function fetchAuthKeys

web/src/api/hooks/useAuthKeys.ts:9–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7 const [error, setError] = useState<string | null>(null);
8
9 const fetchAuthKeys = async () => {
10 try {
11 setLoading(true);
12 setError(null);
13 const keys = await authKeyService.getAllAuthKeys();
14 setAuthKeys(keys);
15 } catch (err) {
16 const errorMessage =
17 err instanceof Error ? err.message : "Failed to fetch auth keys";
18 setError(errorMessage);
19 } finally {
20 setLoading(false);
21 }
22 };
23
24 const createAuthKey = async (name: string): Promise<string | null> => {
25 try {

Callers 2

createAuthKeyFunction · 0.85
useAuthKeysFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected