use echo.NewHTTPError
This commit is contained in:
parent
4213f3b08c
commit
4734a0a6a6
5 changed files with 10 additions and 10 deletions
|
|
@ -11,7 +11,7 @@ func (c *WebHandler) DeleteWeb(ctx echo.Context) error {
|
|||
// Get the ID
|
||||
id, err := models.GetIntURLParam("id", ctx)
|
||||
if err != nil {
|
||||
return ctx.JSON(http.StatusBadRequest, models.Message{"Invalid ID."})
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "Invalid ID.")
|
||||
}
|
||||
|
||||
// Check if the user has the right to delete
|
||||
|
|
|
|||
Reference in a new issue