Add more logging
This commit is contained in:
parent
9947104b77
commit
c906493694
|
@ -62,5 +62,9 @@ func (c *WebHandler) CreateWeb(ctx echo.Context) error {
|
|||
return HandleHTTPError(err, ctx)
|
||||
}
|
||||
|
||||
return ctx.JSON(http.StatusCreated, currentStruct)
|
||||
err = ctx.JSON(http.StatusCreated, currentStruct)
|
||||
if err != nil {
|
||||
return HandleHTTPError(err, ctx)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -59,5 +59,9 @@ func (c *WebHandler) DeleteWeb(ctx echo.Context) error {
|
|||
return HandleHTTPError(err, ctx)
|
||||
}
|
||||
|
||||
return ctx.JSON(http.StatusOK, message{"Successfully deleted."})
|
||||
err = ctx.JSON(http.StatusOK, message{"Successfully deleted."})
|
||||
if err != nil {
|
||||
return HandleHTTPError(err, ctx)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -104,5 +104,9 @@ func (c *WebHandler) ReadAllWeb(ctx echo.Context) error {
|
|||
ctx.Response().Header().Set("x-pagination-result-count", strconv.FormatInt(int64(resultCount), 10))
|
||||
ctx.Response().Header().Set("Access-Control-Expose-Headers", "x-pagination-total-pages, x-pagination-result-count")
|
||||
|
||||
return ctx.JSON(http.StatusOK, result)
|
||||
err = ctx.JSON(http.StatusOK, result)
|
||||
if err != nil {
|
||||
return HandleHTTPError(err, ctx)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -55,5 +55,9 @@ func (c *WebHandler) ReadOneWeb(ctx echo.Context) error {
|
|||
return HandleHTTPError(err, ctx)
|
||||
}
|
||||
|
||||
return ctx.JSON(http.StatusOK, currentStruct)
|
||||
err = ctx.JSON(http.StatusOK, currentStruct)
|
||||
if err != nil {
|
||||
return HandleHTTPError(err, ctx)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -61,5 +61,9 @@ func (c *WebHandler) UpdateWeb(ctx echo.Context) error {
|
|||
return HandleHTTPError(err, ctx)
|
||||
}
|
||||
|
||||
return ctx.JSON(http.StatusOK, currentStruct)
|
||||
err = ctx.JSON(http.StatusOK, currentStruct)
|
||||
if err != nil {
|
||||
return HandleHTTPError(err, ctx)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue