mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Per route api extensions (#542)
* Extend extension mechanism to support per-route API extensions * Tidy up comment * Remove print statement * Minor improvement to README * Avoid calling c.Request.Context() twice
This commit is contained in:
@@ -12,8 +12,7 @@ func (s *Server) handleRouteGet(c *gin.Context) {
|
||||
ctx := c.Request.Context()
|
||||
|
||||
appName := c.MustGet(api.AppName).(string)
|
||||
routePath := path.Clean(c.MustGet(api.Path).(string))
|
||||
|
||||
routePath := path.Clean("/" + c.MustGet(api.Path).(string))
|
||||
route, err := s.Datastore.GetRoute(ctx, appName, routePath)
|
||||
if err != nil {
|
||||
handleErrorResponse(c, err)
|
||||
|
||||
Reference in New Issue
Block a user