diff --git a/backend/handlers/loads/handler.go b/backend/handlers/loads/handler.go index e2a2b34..c92b089 100644 --- a/backend/handlers/loads/handler.go +++ b/backend/handlers/loads/handler.go @@ -81,7 +81,7 @@ func Post(c echo.Context) error { } gbi, err := db.Loads.GetLoadById(context.Background(), *uuid) - if err != nil || gbi.ID.Valid == false { + if err != nil || !gbi.ID.Valid { return handlers.NotFound(c, "load not found") } @@ -202,7 +202,6 @@ func Photo(c echo.Context) error { mt, _, _ := mime.ParseMediaType(string(file.Photo)) return c.Blob(http.StatusOK, mt, file.Photo) - } func Get(c echo.Context) error { @@ -579,7 +578,7 @@ func Delete(c echo.Context) error { }() exists, err := db.Loads.GetLoadById(context.Background(), *uuid) - if err != nil || exists.ID.Valid == false { + if err != nil || !exists.ID.Valid { return handlers.NotFound(c, "load not found") }