diff --git a/src/app.ts b/src/app.ts index e998ede..b579022 100644 --- a/src/app.ts +++ b/src/app.ts @@ -110,7 +110,10 @@ app.post("/api/deleteRequest", async (request, response) => { // Twitch callback app.get("/callback", async (request, response) => { - if (request.query.error) response.redirect(307, '/'); + if (request.query.error) { + response.redirect(307, '/'); + return; + } var authcode = request.query.code as string; var tokenResponse = await fetch("https://id.twitch.tv/oauth2/token", { method: "POST", body: new URLSearchParams({ client_id: config.twitchClientId,