Allow calling root route on app

Fixes #64

Previously calling a root registered route would result in an error
message "Not Found" suggesting the route hadn't been registed, yet when
listing the routes, `fn routes list myapp` you could see the `/` route.

You can now successfully call a root registered route with `fn call
myapp /`
This commit is contained in:
Will Price
2017-07-06 10:33:34 +01:00
parent a5861d5b6f
commit 02d6349cf8
3 changed files with 10 additions and 1 deletions

View File

@@ -327,6 +327,7 @@ func (s *Server) bindHandlers(ctx context.Context) {
engine.DELETE("/tasks", s.handleTaskRequest)
engine.GET("/tasks", s.handleTaskRequest)
engine.Any("/r/:app", s.handleRunnerRequest)
engine.Any("/r/:app/*route", s.handleRunnerRequest)
// This final route is used for extensions, see Server.Add