Files
Thomas Lynch 4014c596b3 Add permission for whether role/user can view global bans on board
Change board query to prevent board staff unban/upgrade/delete/etc global bans
Dont add modlog entry for 0 amount ban edits
2024-05-04 18:33:17 +10:00

18 lines
351 B
JavaScript

'use strict';
const { Bans } = require(__dirname+'/../../db/');
module.exports = async (req, res) => {
const nReturned = await Bans.upgrade(res.locals.bansBoard, req.body.checkedbans, req.body.upgrade)
.then(explain => {
if (explain && explain.stages) {
return explain.stages[0].nReturned;
}
return 0;
});
return nReturned;
};