1
0

use echo.NewHTTPError

This commit is contained in:
konrad
2018-07-11 14:27:16 +02:00
committed by kolaente
parent 4213f3b08c
commit 4734a0a6a6
5 changed files with 10 additions and 10 deletions

View File

@ -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