Skip to content

Commit

Permalink
redirect to scores page after running an update
Browse files Browse the repository at this point in the history
Hours of sleep: 25
Cups of coffee: 0
Cans of soda: 0
Cans of redbull: 0
  • Loading branch information
Gerad Suyderhoud committed Aug 29, 2011
1 parent 27d0eba commit 0f822b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controllers/index.coffee
Expand Up @@ -49,9 +49,10 @@ app.get '/scores', (req, res, next) ->
return next error if error
res.render2 'index/scores', teams: teams

app.get '/scores/update', (req, res) ->
app.get '/scores/update', (req, res, next) ->
Team.updateAllSavedScores (err) ->
res.end err or 'ok'
next err if err
res.redirect '/scores'

app.get '/services', [m.ensureAuth], (req, res, next) ->
return next 401 unless req.user.contestant or req.user.judge or req.user.admin
Expand Down

0 comments on commit 0f822b7

Please sign in to comment.