Merge pull request #86 from pedronasser/runner-route-not-found

fix runner route not found
This commit is contained in:
Travis Reeder
2016-09-04 10:48:29 -07:00
committed by GitHub

View File

@@ -103,12 +103,6 @@ func handleRunner(c *gin.Context) {
return
}
if routes == nil || len(routes) == 0 {
log.WithError(err).Error(models.ErrRunnerRouteNotFound)
c.JSON(http.StatusNotFound, simpleError(models.ErrRunnerRouteNotFound))
return
}
log.WithField("routes", routes).Debug("Got routes from datastore")
for _, el := range routes {
if params, match := matchRoute(el.Path, route); match {
@@ -172,6 +166,8 @@ func handleRunner(c *gin.Context) {
}
}
log.WithError(err).Error(models.ErrRunnerRouteNotFound)
c.JSON(http.StatusNotFound, simpleError(models.ErrRunnerRouteNotFound))
}
var fakeHandler = func(http.ResponseWriter, *http.Request, Params) {}