Added status page support

This commit is contained in:
Deukhoofd 2016-03-27 00:38:47 +01:00
parent ff0393d06a
commit 03e1e7d440
2 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,7 @@ loggedin = false
exports.middleware = -> (req, res, next) ->
cookies = new Cookies( req, res )
return next() if req.path.match(/^\/css|^\/js|^\/fonts|^\/Sprites|^\/tiers|^\/pokemon|^\/replays\/\b/)
return next() if req.path.match(/^\/css|^\/js|^\/fonts|^\/Sprites|^\/tiers|^\/pokemon|^\/ping|^\/replays\/\b/)
return next() if req.path.match(/^\/leaderboard/) # add some proper site authentication later instead
authenticate req, (body) ->

View File

@ -125,6 +125,8 @@ CLIENT_VERSION = assets.getVersion()
species = generations.GenerationJSON[generations.DEFAULT_GENERATION.toUpperCase()].SpeciesData
res.json(formes: formes)
app.get '/ping', (req, res) ->
res.json(200, {response: "pong"})
app.get '/pokeuse/json', (req, res) ->
user= req.user