don't redirect json calls to /splash.html

This commit is contained in:
Tyler Renelle
2013-01-30 14:17:18 -05:00
parent c15d272e12
commit e0f1d74541
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -78,6 +78,9 @@ mongo_store = new MongoStore {url: process.env.NODE_DB_URI}, ->
#show splash page for newcomers
.use (req, res, next) ->
# This was an API call, not a page load
return next() if req.is('json')
if !req.session.userId? and !req.query?.play?
res.redirect('/splash.html')
else