chore(web): remove redundant use of fmt.Sprintf
This commit is contained in:
parent
57ba073874
commit
8e37d5cb76
|
|
@ -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…
Reference in New Issue