Remove all 'useLocal' params
This commit is contained in:
@@ -11,7 +11,6 @@ type Param = {
|
||||
priviledge: string;
|
||||
email: string;
|
||||
};
|
||||
useLocal?: boolean;
|
||||
user: DATASQUIREL_LoggedInUser;
|
||||
};
|
||||
|
||||
@@ -26,10 +25,11 @@ type Param = {
|
||||
export default async function addAdminUserOnLogin({
|
||||
query,
|
||||
user,
|
||||
useLocal,
|
||||
}: Param): Promise<any> {
|
||||
try {
|
||||
const finalDbHandler = useLocal ? LOCAL_DB_HANDLER : DB_HANDLER;
|
||||
const finalDbHandler = global.DSQL_USE_LOCAL
|
||||
? LOCAL_DB_HANDLER
|
||||
: DB_HANDLER;
|
||||
const { invite, database_access, priviledge, email } = query;
|
||||
|
||||
const lastInviteTimeQuery = `SELECT date_created_code FROM invitations WHERE inviting_user_id=? AND invited_user_email=?`;
|
||||
@@ -82,7 +82,6 @@ export default async function addAdminUserOnLogin({
|
||||
image: user.image,
|
||||
image_thumbnail: user.image_thumbnail,
|
||||
},
|
||||
useLocal,
|
||||
});
|
||||
|
||||
////////////////////////////////////////////////
|
||||
@@ -122,7 +121,6 @@ export default async function addAdminUserOnLogin({
|
||||
table: table_slug,
|
||||
priviledge: priviledge,
|
||||
},
|
||||
useLocal,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user