From 895fb121407390621dd31f1347e2fd25d6514a12 Mon Sep 17 00:00:00 2001 From: Omer Sabic Date: Wed, 14 Aug 2024 15:47:41 +0200 Subject: [PATCH] bugfix --- src/routes/auth.js | 2 +- src/utils/youtube.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/auth.js b/src/routes/auth.js index 7b820d7..7880c79 100644 --- a/src/routes/auth.js +++ b/src/routes/auth.js @@ -29,7 +29,7 @@ export const authRoutes = (fastify, _, done) => { const channel_info = await getChannelInfo(token.access_token); const [existing_user] = await db.select().from(usersTable).where(eq(usersTable.google_id, user_info.id)); - console.log("existing user", existing_user); + let user; let session_id; await db.transaction(async tx => { diff --git a/src/utils/youtube.js b/src/utils/youtube.js index 7fd9965..bad40b0 100644 --- a/src/utils/youtube.js +++ b/src/utils/youtube.js @@ -399,7 +399,7 @@ export async function getChannelInfo(access_token) { part: "id,contentDetails,snippet", mine: true, maxResults: 1 - }, {agent}).then(res => res); + }).then(res => res); if (!channel.data.items[0]) { throw new Error("no_channel");