Fix critical bug in signup code

Variable scope/assignment issue
This commit is contained in:
Basti 2019-09-01 17:00:56 +02:00
parent 157d2dee49
commit 6972d6c88e
No known key found for this signature in database
GPG Key ID: BE4634D632D39B67

View File

@ -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}`