From a4f9eb6b22ed0f96b3e98965bce088ad78c47c87 Mon Sep 17 00:00:00 2001 From: Evert Date: Sat, 14 Oct 2017 23:40:12 +0300 Subject: [PATCH] display banned message on fb login --- server/routes/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routes/api.js b/server/routes/api.js index 89f2397..809e808 100644 --- a/server/routes/api.js +++ b/server/routes/api.js @@ -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) {