add health benefit form
fix super admin
This commit is contained in:
@@ -22,9 +22,11 @@ class CreateTeamAccountService {
|
||||
|
||||
logger.info(ctx, `Creating new company account...`);
|
||||
|
||||
const { error, data } = await this.client.rpc('create_team_account', {
|
||||
account_name: params.name,
|
||||
});
|
||||
const { error, data } = await this.client
|
||||
.schema('medreport')
|
||||
.rpc('create_team_account', {
|
||||
account_name: params.name,
|
||||
});
|
||||
|
||||
if (error) {
|
||||
logger.error(
|
||||
@@ -35,7 +37,7 @@ class CreateTeamAccountService {
|
||||
`Error creating company account`,
|
||||
);
|
||||
|
||||
throw new Error('Error creating company account');
|
||||
throw new Error('Error creating company account: ' + error);
|
||||
}
|
||||
|
||||
logger.info(ctx, `Company account created successfully`);
|
||||
|
||||
@@ -9,7 +9,9 @@ import { Database } from '@kit/supabase/database';
|
||||
*/
|
||||
export async function isSuperAdmin(client: SupabaseClient<Database>) {
|
||||
try {
|
||||
const { data, error } = await client.rpc('is_super_admin');
|
||||
const { data, error } = await client
|
||||
.schema('medreport')
|
||||
.rpc('is_super_admin');
|
||||
|
||||
if (error) {
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user