mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
fix: #9819, show same time info for ban
This commit is contained in:
@@ -21,7 +21,10 @@ const url = nconf.get('url');
|
||||
|
||||
helpers.noScriptErrors = async function (req, res, error, httpStatus) {
|
||||
if (req.body.noscript !== 'true') {
|
||||
return res.status(httpStatus).send(error);
|
||||
if (typeof error === 'string') {
|
||||
return res.status(httpStatus).send(error);
|
||||
}
|
||||
return res.status(httpStatus).json(error);
|
||||
}
|
||||
const middleware = require('../middleware');
|
||||
const httpStatusString = httpStatus.toString();
|
||||
|
||||
Reference in New Issue
Block a user