diff --git a/nt-web-app/identity/forgejo.ts b/nt-web-app/identity/forgejo.ts index 8c6c7d3..2b4578b 100644 --- a/nt-web-app/identity/forgejo.ts +++ b/nt-web-app/identity/forgejo.ts @@ -57,10 +57,7 @@ const getUser = async (accessToken: string): Promise => { 'Authorization': `Bearer ${accessToken}` } }) - .then((res) => { - console.log(res.data); - return res.data - }) + .then((res) => res.data); } const getUsersById = async (userIds: string[]): Promise => { diff --git a/nt-web-app/pages/api/auth/refresh.ts b/nt-web-app/pages/api/auth/refresh.ts index 6fa4c24..8ca6b3d 100644 --- a/nt-web-app/pages/api/auth/refresh.ts +++ b/nt-web-app/pages/api/auth/refresh.ts @@ -55,7 +55,7 @@ export default async function handler( switch (user.provider as LoginProvider) { case provider: - //get the user from the Twitch API using TWITCH_CLIENT_ID and TWITCH_API_KEY + //get the user from the provider if possible, else throw a 502 const userData = await getUsersById([userSub]) if (!userData || userData.length === 0) { res.status(502).end("502 Failed to get user data from identity provider");