1
0

chore(web): remove redundant use of fmt.Sprintf

(cherry picked from commit 8e37d5cb76ac73ac800ef32edde7cb142d22b9a0)
This commit is contained in:
kolaente 2024-08-29 16:28:37 +02:00
parent 5768648760
commit 459c8daed6
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
5 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

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

View File

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

View File

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