This commit is contained in:
Omer Sabic 2024-08-14 15:47:41 +02:00
parent 661f93350f
commit 895fb12140
2 changed files with 2 additions and 2 deletions

View File

@ -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 => {

View File

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