unfuck #374 guess i was tired

jschan
Thomas Lynch 3 years ago
parent 10e8c608b8
commit c6bb7f1875
  1. 2
      models/forms/addban.js
  2. 2
      models/forms/banposter.js
  3. 1
      models/forms/editpost.js
  4. 1
      models/forms/makepost.js

@ -24,7 +24,7 @@ module.exports = async (req, res, redirect) => {
'board': req.params.board || null,
'posts': null,
'issuer': req.session.user,
'showUser': req.body.hide_name != null,
'showUser': !req.body.hide_name,
'date': actionDate,
'expireAt': new Date(actionDate.getTime() + (req.body.ban_duration || defaultBanDuration)),
'allowAppeal': req.body.no_appeal ? false : true,

@ -47,6 +47,7 @@ module.exports = async (req, res, next) => {
'expireAt': banExpiry,
allowAppeal,
'appeal': null,
'showUser': !req.body.hide_name,
'seen': false,
});
}
@ -85,6 +86,7 @@ module.exports = async (req, res, next) => {
'expireAt': banExpiry,
allowAppeal,
'appeal': null,
'showUser': !req.body.hide_name,
'seen': false
});
});

@ -62,6 +62,7 @@ todo: handle some more situations
'date': banDate,
'expireAt': banExpiry,
'allowAppeal': true, //should i make this configurable if appealable?
'showUser': true,
'seen': false
};
const insertedResult = await Bans.insertOne(ban);

@ -154,6 +154,7 @@ ${res.locals.numFiles > 0 ? req.files.file.map(f => f.name+'|'+(f.phash || '')).
'date': banDate,
'expireAt': banExpiry,
'allowAppeal': true, //should i make this configurable if appealable?
'showUser': true,
'seen': false
};
const insertedResult = await Bans.insertOne(ban);

Loading…
Cancel
Save