mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
rename and reword pubChalsMinPrize to reflect that it's only for Tavern challenges
This commit is contained in:
@@ -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.",
|
||||||
|
|||||||
@@ -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'),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user