Skip to content

Commit

Permalink
Fixed team cost calculation bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
kunagpal committed Jan 17, 2016
1 parent 6d50e4c commit bb3696e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions routes/home.js
Expand Up @@ -36,7 +36,7 @@ var async = require('async');
var router = require('express').Router();
var authenticated = function(req, res, next)
{
if((process.env.LIVE === '1') && (req.signedCookies.name || req.signedCookies.admin))
if(req.signedCookies.name || req.signedCookies.admin)
{
next();
}
Expand Down Expand Up @@ -82,7 +82,6 @@ router.get('/', authenticated, function (req, res){
{
if (err)
{
console.log(err.message);
res.redirect('/home');
}
else
Expand Down Expand Up @@ -331,9 +330,10 @@ router.post('/players', function (req, res){
}
else
{
var reduction = function(arg)
var reduction = function(arg, callback)
{
cost -= parseInt(arg.Cost);
callback();
};
var onReduce = function(err)
{
Expand Down

0 comments on commit bb3696e

Please sign in to comment.