wip: custom logger and error handler

This commit is contained in:
2025-06-10 11:17:55 +01:00
parent 4935a65112
commit fae46f4bf7
7 changed files with 74 additions and 13 deletions
+1 -2
View File
@@ -180,8 +180,7 @@ func (api *API) UpdateUserLogoHandler(context echo.Context) error {
file, err := context.FormFile("logo")
if err != nil {
log.Println(fmt.Sprintf("Error updating logo for User: %v.", err))
return context.String(http.StatusBadRequest, "No image has been uploaded!")
return types.Error{Code: http.StatusBadRequest, Messages: []string{"No image has been uploaded!"}}
}
ext := strings.ToLower(filepath.Ext(file.Filename))