display banned message on fb login
This commit is contained in:
parent
b0a6856fbc
commit
a4f9eb6b22
@ -77,7 +77,7 @@ router.post('/external/facebook/callback', wrap(async (req, res, next) => {
|
|||||||
let response = await APIExtern.Facebook.callback(req.session.user, sane)
|
let response = await APIExtern.Facebook.callback(req.session.user, sane)
|
||||||
|
|
||||||
if (response.banned) {
|
if (response.banned) {
|
||||||
return res.render('user/banned', {bans: response.banned, ipban: response.ip})
|
return JsonData(req, res, 'You are banned.')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.error) {
|
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)
|
let response = await APIExtern.Google.callback(req.session.user, req.body, req.realIP)
|
||||||
if (response.banned) {
|
if (response.banned) {
|
||||||
return JsonData(req, res, 'Banned user.', '/login')
|
return JsonData(req, res, 'You are banned.', '/login')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.error) {
|
if (response.error) {
|
||||||
|
Reference in New Issue
Block a user