rename and reword pubChalsMinPrize to reflect that it's only for Tavern challenges

This commit is contained in:
Alys
2016-05-14 16:40:40 +10:00
parent 4dd7c29baf
commit fd13c7aa60
3 changed files with 3 additions and 3 deletions

View File

@@ -54,7 +54,7 @@
"canOnlyInviteEmailUuid": "Can only invite using uuids or emails.", "canOnlyInviteEmailUuid": "Can only invite using uuids or emails.",
"inviteMissingEmail": "Missing email address in invite.", "inviteMissingEmail": "Missing email address in invite.",
"onlyGroupLeaderChal": "Only the group leader can create challenges", "onlyGroupLeaderChal": "Only the group leader can create challenges",
"pubChalsMinPrize": "Prize must be at least 1 Gem for public challenges.", "tavChalsMinPrize": "Prize must be at least 1 Gem for Tavern challenges.",
"cantAfford": "You can't afford this prize. Purchase more gems or lower the prize amount.", "cantAfford": "You can't afford this prize. Purchase more gems or lower the prize amount.",
"challengeIdRequired": "\"challengeId\" must be a valid UUID.", "challengeIdRequired": "\"challengeId\" must be a valid UUID.",
"winnerIdRequired": "\"winnerId\" must be a valid UUID.", "winnerIdRequired": "\"winnerId\" must be a valid UUID.",

View File

@@ -37,7 +37,7 @@ describe('POST /challenges', () => {
})).to.eventually.be.rejected.and.eql({ })).to.eventually.be.rejected.and.eql({
code: 401, code: 401,
error: 'NotAuthorized', error: 'NotAuthorized',
message: t('pubChalsMinPrize'), message: t('tavChalsMinPrize'),
}); });
}); });

View File

@@ -52,7 +52,7 @@ api.createChallenge = {
} }
if (group._id === TAVERN_ID && prize < 1) { if (group._id === TAVERN_ID && prize < 1) {
throw new NotAuthorized(res.t('pubChalsMinPrize')); throw new NotAuthorized(res.t('tavChalsMinPrize'));
} }
if (prize > 0) { if (prize > 0) {