Worked in scott's comments and got tests working again

This commit is contained in:
Ruben Vereecken 2014-07-14 20:05:03 +02:00
parent 6e9091fdf0
commit 6219697295

View file

@ -157,12 +157,10 @@ module.exports.setup = (app) ->
res.send msg + '<p><a href="/account/settings">Account settings</a></p>'
res.end()
app.get '/auth/name/?*', (req, res) ->
app.get '/auth/name*', (req, res) ->
parts = req.path.split '/'
console.log parts
originalName = parts[3]
return errors.badInput res, 'No name provided.' unless originalName and originalName isnt ''
originalName = decodeURI parts[3]
return errors.badInput res, 'No name provided.' unless parts.length > 3 and originalName? and originalName isnt ''
return errors.notFound res if parts.length isnt 4
User.unconflictName originalName, (err, name) ->