feat: min:rep:upvote, and other limits similar to downvotes

closes #10380
This commit is contained in:
Barış Soner Uşaklı
2022-03-11 13:34:36 -05:00
parent 2056ac04e0
commit 3414a23bce
8 changed files with 50 additions and 27 deletions

View File

@@ -226,7 +226,7 @@ module.exports = function (User) {
}
const reputation = await User.getUserField(uid, 'reputation');
if (reputation < meta.config[setting]) {
throw new Error(`[[error:not-enough-reputation-${setting.replace(/:/g, '-')}]]`);
throw new Error(`[[error:not-enough-reputation-${setting.replace(/:/g, '-')}, ${meta.config[setting]}]]`);
}
};