mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Merge pull request #86 from pedronasser/runner-route-not-found
fix runner route not found
This commit is contained in:
@@ -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) {}
|
||||
|
||||
Reference in New Issue
Block a user