mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 02:02:19 +00:00
Check food is Saddle before selling
This commit is contained in:
parent
9709b92d33
commit
201b4551a3
1 changed files with 2 additions and 2 deletions
|
|
@ -43,8 +43,8 @@ module.exports = function sell (user, req = {}) {
|
|||
throw new NotFound(i18n.t('userItemsNotEnough', {type}, req.language));
|
||||
}
|
||||
|
||||
if (content[type][key].sellWarningNote) {
|
||||
throw new NotAuthorized(content[type][key].sellWarningNote());
|
||||
if (type === 'food' && key === 'Saddle') {
|
||||
throw new NotAuthorized(content[type][key].sellWarningNote(req.language));
|
||||
}
|
||||
|
||||
user.items[type][key] -= amount;
|
||||
|
|
|
|||
Loading…
Reference in a new issue