chore(web): remove redundant use of fmt.Sprintf
(cherry picked from commit 8e37d5cb76ac73ac800ef32edde7cb142d22b9a0)
This commit is contained in:
parent
5768648760
commit
459c8daed6
@ -36,7 +36,7 @@ func (c *WebHandler) CreateWeb(ctx echo.Context) error {
|
||||
if errors.As(err, &he) {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided. Error was: %s", he.Message))
|
||||
}
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided."))
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "Invalid model provided.")
|
||||
}
|
||||
|
||||
// Validate the struct
|
||||
|
@ -41,7 +41,7 @@ func (c *WebHandler) DeleteWeb(ctx echo.Context) error {
|
||||
if errors.As(err, &he) {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided. Error was: %s", he.Message))
|
||||
}
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided."))
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "Invalid model provided.")
|
||||
}
|
||||
|
||||
// Check if the user has the right to delete
|
||||
|
@ -43,7 +43,7 @@ func (c *WebHandler) ReadAllWeb(ctx echo.Context) error {
|
||||
if errors.As(err, &he) {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided. Error was: %s", he.Message))
|
||||
}
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided."))
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "Invalid model provided.")
|
||||
}
|
||||
|
||||
// Pagination
|
||||
|
@ -37,7 +37,7 @@ func (c *WebHandler) ReadOneWeb(ctx echo.Context) error {
|
||||
if errors.As(err, &he) {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided. Error was: %s", he.Message))
|
||||
}
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided."))
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "Invalid model provided.")
|
||||
}
|
||||
|
||||
// Check rights
|
||||
|
@ -37,7 +37,7 @@ func (c *WebHandler) UpdateWeb(ctx echo.Context) error {
|
||||
if errors.As(err, &he) {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided. Error was: %s", he.Message))
|
||||
}
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid model provided."))
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "Invalid model provided.")
|
||||
}
|
||||
|
||||
// Validate the struct
|
||||
|
Loading…
x
Reference in New Issue
Block a user