From 6972d6c88eadf791ff085d251e150fc66e83b776 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Sun, 1 Sep 2019 17:00:56 +0200 Subject: [PATCH] Fix critical bug in signup code Variable scope/assignment issue --- integrations/github.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integrations/github.js b/integrations/github.js index 9cbafa1..b04fb29 100644 --- a/integrations/github.js +++ b/integrations/github.js @@ -214,8 +214,9 @@ module.exports = async function(robot, kredits) { res.status(400).json({}); return; } + let githubResponse; try { - const githubResponse = await fetch('https://api.github.com/user', { + githubResponse = await fetch('https://api.github.com/user', { headers: { 'Accept': 'application/vnd.github.v3+json', 'Authorization': `token ${accessToken}` -- 2.25.1