debug
This commit is contained in:
parent
54ed89cdd8
commit
096b4f64d4
@ -14,6 +14,8 @@ export async function createSession(user_id, {
|
|||||||
refresh_token,
|
refresh_token,
|
||||||
expires_at,
|
expires_at,
|
||||||
}) {
|
}) {
|
||||||
|
try {
|
||||||
|
|
||||||
const [existing_session] = await db.select().from(sessions).where(eq(sessions.user_id, user_id));
|
const [existing_session] = await db.select().from(sessions).where(eq(sessions.user_id, user_id));
|
||||||
|
|
||||||
if (existing_session) {
|
if (existing_session) {
|
||||||
@ -35,4 +37,9 @@ export async function createSession(user_id, {
|
|||||||
return {
|
return {
|
||||||
session_id: token[0].id
|
session_id: token[0].id
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user