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:
@@ -7,13 +7,12 @@ import {
|
||||
NotAuthorized,
|
||||
} from '../../libs/errors';
|
||||
import i18n from '../../i18n';
|
||||
import apiMessages from '../../../../server/libs/apiMessages';
|
||||
|
||||
module.exports = function allocate (user, req = {}) {
|
||||
let stat = get(req, 'query.stat', 'str');
|
||||
|
||||
if (ATTRIBUTES.indexOf(stat) === -1) {
|
||||
throw new BadRequest(apiMessages('invalidAttribute', {attr: stat}));
|
||||
throw new BadRequest(i18n.t('invalidAttribute', {attr: stat}, req.language));
|
||||
}
|
||||
|
||||
if (user.stats.points > 0) {
|
||||
|
||||
Reference in New Issue
Block a user