mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Worked in scott's comments and got tests working again
This commit is contained in:
parent
6e9091fdf0
commit
6219697295
1 changed files with 3 additions and 5 deletions
|
@ -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) ->
|
||||
|
|
Loading…
Reference in a new issue