()
| 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 { |
no outgoing calls
no test coverage detected