|
@ -7,7 +7,6 @@ function LoginRoute(req, res) { |
|
|
|
|
|
|
|
|
authUser(telegramResponse, (success, msg) => { |
|
|
authUser(telegramResponse, (success, msg) => { |
|
|
if (success) { |
|
|
if (success) { |
|
|
|
|
|
|
|
|
// User is already logged in
|
|
|
// User is already logged in
|
|
|
if (req.session.user == telegramResponse.id) { |
|
|
if (req.session.user == telegramResponse.id) { |
|
|
res.send({ authorized: success }); |
|
|
res.send({ authorized: success }); |
|
@ -34,7 +33,6 @@ function LoginRoute(req, res) { |
|
|
res.status(401).send({ authorized: success, message: msg }); |
|
|
res.status(401).send({ authorized: success, message: msg }); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function authUser(telegramResponse, done) { |
|
|
function authUser(telegramResponse, done) { |
|
|