fixfixfix
This commit is contained in:
parent
fba83c3943
commit
3871396339
@ -29,6 +29,7 @@ export const authRoutes = (fastify, _, done) => {
|
||||
|
||||
const [existing_user] = await db.select().from(usersTable).where(eq(usersTable.google_id, user_info.id));
|
||||
let user;
|
||||
let session_id;
|
||||
await db.transaction(async tx => {
|
||||
try {
|
||||
if (existing_user) {
|
||||
@ -62,7 +63,6 @@ export const authRoutes = (fastify, _, done) => {
|
||||
return;
|
||||
}
|
||||
}
|
||||
let session_id;
|
||||
let existing_session = await tx.select().from(sessions).where(eq(sessions.user_id, user.id));
|
||||
if (!existing_session || existing_session.length === 0) {
|
||||
let session_info = await createSession(user.id, {
|
||||
|
Loading…
Reference in New Issue
Block a user