mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Fix route update procedure
API impact: We need to drop default value for type because it brought this type of bugs. Starting this patch users should specify route type through CLI or func.yml Closes: #222
This commit is contained in:
@@ -110,7 +110,9 @@ func (s *Server) bindAndValidate(c *gin.Context, method string, wroute *models.R
|
||||
wroute.Route.Path = p
|
||||
}
|
||||
|
||||
wroute.Route.SetDefaults()
|
||||
if method != http.MethodPatch {
|
||||
wroute.Route.SetDefaults()
|
||||
}
|
||||
|
||||
return wroute.Validate(method == http.MethodPatch)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user