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");