mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 21:05:06 +03:00
fix build errors
This commit is contained in:
1 parent
7695754f3f
commit
686563ca39
1 file changed
+9
-5
@@ -31,10 +31,12 @@ export function ApiKeyPill({
|
||||
|
||||
// Function to fetch the full API key
|
||||
async function fetchFullApiKey(): Promise<string> {
|
||||
if (!apiKey.id) return apiKey.api_key // Early return if no id
|
||||
|
||||
try {
|
||||
const { data, error } = await get('/v1/projects/{ref}/api-keys/{id}', {
|
||||
params: {
|
||||
path: { ref: projectRef, id: apiKey.id as string },
|
||||
path: { ref: projectRef, id: apiKey.id },
|
||||
query: { reveal: true },
|
||||
},
|
||||
})
|
||||
@@ -61,10 +63,12 @@ export function ApiKeyPill({
|
||||
const fullKey = await fetchFullApiKey()
|
||||
|
||||
// Clear from cache after copying
|
||||
queryClient.removeQueries({
|
||||
queryKey: apiKeysKeys.single(projectRef, apiKey.id as string),
|
||||
exact: true,
|
||||
})
|
||||
if (apiKey.id) {
|
||||
queryClient.removeQueries({
|
||||
queryKey: apiKeysKeys.single(projectRef, apiKey.id),
|
||||
exact: true,
|
||||
})
|
||||
}
|
||||
|
||||
return fullKey
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user