display banned message on fb login

This commit is contained in:
Evert Prants 2017-10-14 23:40:12 +03:00
parent b0a6856fbc
commit a4f9eb6b22
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -77,7 +77,7 @@ router.post('/external/facebook/callback', wrap(async (req, res, next) => {
let response = await APIExtern.Facebook.callback(req.session.user, sane)
if (response.banned) {
return res.render('user/banned', {bans: response.banned, ipban: response.ip})
return JsonData(req, res, 'You are banned.')
}
if (response.error) {
@ -274,7 +274,7 @@ router.post('/external/google/callback', wrap(async (req, res) => {
let response = await APIExtern.Google.callback(req.session.user, req.body, req.realIP)
if (response.banned) {
return JsonData(req, res, 'Banned user.', '/login')
return JsonData(req, res, 'You are banned.', '/login')
}
if (response.error) {