mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
Add coveralls integration (#35424)
* update gh action, update vitest config * debug * debug cov * idk try something different * test2 * test3 * add base path * rm debug * add apiAuthenticate tests * supabaseClient tests * apiWrappers tests * add apiHelpers tests * add configcat tests * add formatSql tests * add github tests * add cloudprovider utils tests * add helpers tests * fix typeerr * add missing readonly err * fix typeerrrs * fix type errors in apiWrapper tests * fix apiHelpers test * add packages/ui tests * add coveralls flags * try coveralls parallel config * fix coveralls parallel config --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
This commit is contained in:
1 parent
31aad403de
commit
6e91494b16
19 files changed
+1108
-15
No files matched your search
@@ -19,18 +19,18 @@ export async function apiAuthenticate(
|
||||
res: NextApiResponse
|
||||
): Promise<SupaResponse<User>> {
|
||||
if (!req) {
|
||||
return { error: new Error('Request is not available') } as unknown as SupaResponse<User>
|
||||
return { error: new Error('Request is not available') }
|
||||
}
|
||||
|
||||
if (!res) {
|
||||
return { error: new Error('Response is not available') } as unknown as SupaResponse<User>
|
||||
return { error: new Error('Response is not available') }
|
||||
}
|
||||
|
||||
const { slug: orgSlug, ref: projectRef } = req.query
|
||||
try {
|
||||
const user = await fetchUser(req, res)
|
||||
if (!user) {
|
||||
return { error: new Error('The user does not exist') } as unknown as SupaResponse<User>
|
||||
return { error: new Error('The user does not exist') }
|
||||
}
|
||||
|
||||
if (orgSlug || projectRef) await checkMemberPermission(req, user)
|
||||
@@ -38,7 +38,7 @@ export async function apiAuthenticate(
|
||||
return user
|
||||
} catch (error: any) {
|
||||
console.error('Error at apiAuthenticate', error)
|
||||
return { error: { message: error.message ?? 'unknown' } } as unknown as SupaResponse<User>
|
||||
return { error: { name: 'Error', message: error.message ?? 'unknown' } }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user