1
0

Updated the web handler with updated param binder

This commit is contained in:
kolaente
2019-06-28 09:13:17 +02:00
parent 5d3b6573ca
commit fc3c5f2187
12 changed files with 43 additions and 304 deletions

View File

@ -27,7 +27,7 @@ func (c *WebHandler) UpdateWeb(ctx echo.Context) error {
currentStruct := c.EmptyStruct()
// Get the object & bind params to struct
if err := ParamBinder(currentStruct, ctx); err != nil {
if err := ctx.Bind(currentStruct); err != nil {
return echo.NewHTTPError(http.StatusBadRequest, "No or invalid model provided.")
}