mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
Revert "moving developer-only strings to api messages (#10188)"
This reverts commit a42cb0e3ab. Testing hypothesis that this was causing Staging to break.
This commit is contained in:
@@ -6,14 +6,13 @@ import {
|
||||
NotAuthorized,
|
||||
NotFound,
|
||||
} from '../libs/errors';
|
||||
import apiMessages from '../../../server/libs/apiMessages';
|
||||
|
||||
module.exports = function hatch (user, req = {}) {
|
||||
let egg = get(req, 'params.egg');
|
||||
let hatchingPotion = get(req, 'params.hatchingPotion');
|
||||
|
||||
if (!(egg && hatchingPotion)) {
|
||||
throw new BadRequest(apiMessages('missingEggHatchingPotion'));
|
||||
throw new BadRequest(i18n.t('missingEggHatchingPotionHatch', req.language));
|
||||
}
|
||||
|
||||
if (!(user.items.eggs[egg] > 0 && user.items.hatchingPotions[hatchingPotion] > 0)) {
|
||||
|
||||
Reference in New Issue
Block a user