feat(items): item type can not changing in inventory type.

This commit is contained in:
a.bouhuolia
2021-03-03 14:25:16 +02:00
parent 9fef91b965
commit 4f98db4c4b
3 changed files with 47 additions and 2 deletions

View File

@@ -538,6 +538,15 @@ export default class ItemsController extends BaseController {
],
});
}
if (error.errorType === 'ITEM_CANNOT_CHANGE_INVENTORY_TYPE') {
return res.status(400).send({
errors: [{
type: 'ITEM_CANNOT_CHANGE_INVENTORY_TYPE',
message: 'Cannot change inventory item type',
code: 340,
}],
});
}
}
next(error);
}