Added status page support
This commit is contained in:
parent
ff0393d06a
commit
03e1e7d440
|
@ -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) ->
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue