feat: Stop showing who banned a user in the ban message

This commit is contained in:
Jemma Poffinbarger
2025-01-11 16:51:05 -06:00
parent 14dd200aad
commit 9a2bb69601
2 changed files with 4 additions and 1 deletions

View File

@@ -8,6 +8,8 @@ const SettingsSchema = new Schema({
default: 0
},
ban_lift_date: Date,
// TODO: Move bans to their own collection. User settings should be scoped to older the user
banned_by: Number,
ban_reason: String,
profile_comment: {
type: String,

View File

@@ -118,7 +118,8 @@ router.post('/accounts/:pid', async (req, res) => {
await SETTINGS.findOneAndUpdate({ pid: pid }, {
account_status: req.body.account_status,
ban_lift_date: req.body.ban_lift_date,
ban_reason: `${req.user.username} (${req.pid}): ${req.body.ban_reason}`
banned_by: req.pid,
ban_reason: req.body.ban_reason
});
res.json({