mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
challenges: minimum 1 gem for public challenges
This commit is contained in:
@@ -117,6 +117,7 @@ api.create = function(req, res){
|
||||
var user = res.locals.user;
|
||||
var waterfall = [];
|
||||
if (+req.body.prize < 0) return res.json(401, {err: 'Challenge prize must be >= 0'});
|
||||
if (req.body.group=='habitrpg' && +req.body.prize < 1) return res.json(401, {err: 'Prize must be at least 1 Gem for public challenges.'});
|
||||
if (+req.body.prize > 0) {
|
||||
waterfall = [
|
||||
function(cb){
|
||||
|
||||
Reference in New Issue
Block a user