Skip to content

Commit

Permalink
prevent addTenGems and addHourglass being used in production -- PRs H…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alys committed Oct 27, 2015
1 parent f5d6c92 commit a29c412
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions website/src/controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,14 +402,14 @@ api['delete'] = function(req, res, next) {

// api.unlock // see Shared.ops

api.addTenGems = function(req, res, next) {
"development" === nconf.get("NODE_ENV") && (api.addTenGems = function(req, res, next) {
var user = res.locals.user;
user.balance += 2.5;
user.save(function(err){
if (err) return next(err);
res.send(204);
})
}
});
});

/*
------------------------------------------------------------------------
Expand All @@ -419,16 +419,16 @@ api.addTenGems = function(req, res, next) {

// api.unlock // see Shared.ops

api.addHourglass = function(req, res, next) {
"development" === nconf.get("NODE_ENV") && (api.addHourglass = function(req, res, next) {
var user = res.locals.user;

user.purchased.plan.consecutive.trinkets += 1;

user.save(function(err){
if (err) return next(err);
res.send(204);
})
}
});
});

/*
------------------------------------------------------------------------
Expand Down

0 comments on commit a29c412

Please sign in to comment.