From 0ea1e0064e8806a677cd9e5254f2aade1da9f3cc Mon Sep 17 00:00:00 2001 From: GingerPlusPlus Date: Thu, 20 Jun 2019 11:58:19 +0200 Subject: [PATCH] Keep warns in /unban --- stores/user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stores/user.js b/stores/user.js index 3e264a9..3a52f01 100644 --- a/stores/user.js +++ b/stores/user.js @@ -130,7 +130,7 @@ const unban = ({ id }) => User.update( { id }, { - $set: { status: 'member', warns: [] }, + $set: { status: 'member' }, $unset: { ban_details: true, ban_reason: true }, } ); @@ -156,7 +156,7 @@ const unwarn = ({ id }, warnQuery) => } ); -const nowarns = unban; +const nowarns = query => unwarn(query, {}); const getWarns = ({ id }) => User.findOne({ id })