misc fixes and enable dev endpoints for easier live testing

This commit is contained in:
Matteo Pagliazzi 2016-04-13 22:55:39 +02:00
parent 54aac99a6a
commit 925881b2a0
4 changed files with 5 additions and 3 deletions

View file

@ -458,7 +458,7 @@ api.delete = function(req, res, next) {
Development Only Operations
------------------------------------------------------------------------
*/
if (nconf.get('NODE_ENV') === 'development') {
if (true || nconf.get('NODE_ENV') === 'development') {
api.addTenGems = function(req, res, next) {
var user = res.locals.user;

View file

@ -13,6 +13,7 @@ import {
import common from '../../../../common';
import Q from 'q';
import _ from 'lodash';
import logger from '../../libs/api-v3/logger';
let api = {};
@ -416,7 +417,7 @@ api.scoreTask = {
await chalTask.scoreChallengeTask(delta);
} catch (e) {
// TODO handle
logger.error(e);
}
}
},

View file

@ -261,6 +261,7 @@ function cron (options = {}) {
gaLabel: 'Cron Count',
gaValue: user.flags.cronCount,
uuid: user._id,
user,
resting: user.preferences.sleep,
cronCount: user.flags.cronCount,
progressUp: _.min([_progress.up, 900]),

View file

@ -79,7 +79,7 @@ footer.footer(ng-controller='FooterCtrl')
tr
td
iframe(src='/bower_components/github-buttons/github-btn.html?user=habitrpg&repo=habitrpg&type=watch&count=true', allowtransparency='true', frameborder='0', scrolling='0', width='85px', height='20px')
else if (env.NODE_ENV==='development' || env.NODE_ENV==='test') && !env.isStaticPage
else if (true || env.NODE_ENV==='development' || env.NODE_ENV==='test') && !env.isStaticPage
h4 Debug
.btn-group-vertical
a.btn.btn-default(ng-click='setHealthLow()') Health = 1