Skip to content

Commit

Permalink
Merge pull request #153 from aupous/update-request-guild
Browse files Browse the repository at this point in the history
fix: update request guild
  • Loading branch information
lammel authored Nov 22, 2020
2 parents 61139bf + fdc5252 commit 06d53e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/content/guide/request.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ func main() {
e.POST("/users", func(c echo.Context) (err error) {
u := new(User)
if err = c.Bind(u); err != nil {
return
return echo.NewHTTPError(http.StatusBadRequest, err.Error())
}
if err = c.Validate(u); err != nil {
return
return echo.NewHTTPError(http.StatusBadRequest, err.Error())
}
return c.JSON(http.StatusOK, u)
})
Expand Down

0 comments on commit 06d53e0

Please sign in to comment.