Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #21 from varda/root-route
Browse files Browse the repository at this point in the history
Allow missing trailing slash in root route
  • Loading branch information
martijnvermaat committed Mar 31, 2016
2 parents 1830774 + 750297e commit 806a9ab
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,6 @@ app = Sammy '#main', ->
throw new ApiError 'mygeneinfo_error',
"MyGene.info query failed: #{ @params.query }"

# Homepage.
@get '/', ->
@show 'home'

# Authenticate.
@post '/authenticate', ->
$('#form-authenticate').removeClass 'success fail'
Expand Down Expand Up @@ -906,5 +902,10 @@ app = Sammy '#main', ->
@show 'variants', data
.catch ApiError, ({message}) => @error message

# Homepage.
# This route acts as a catchall and must be defined last.
@get '', ->
@show 'home'


module.exports = app

0 comments on commit 806a9ab

Please sign in to comment.