happy monday _ bleh _ #9

Merged
rrise merged 3 commits from mmoooorr into master 2025-06-11 01:43:57 +00:00
Showing only changes of commit 56e2acfe30 - Show all commits

View File

@@ -81,7 +81,7 @@ func Post(c echo.Context) error {
} }
gbi, err := db.Loads.GetLoadById(context.Background(), *uuid) 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") return handlers.NotFound(c, "load not found")
} }
@@ -202,7 +202,6 @@ func Photo(c echo.Context) error {
mt, _, _ := mime.ParseMediaType(string(file.Photo)) mt, _, _ := mime.ParseMediaType(string(file.Photo))
return c.Blob(http.StatusOK, mt, file.Photo) return c.Blob(http.StatusOK, mt, file.Photo)
} }
func Get(c echo.Context) error { func Get(c echo.Context) error {
@@ -579,7 +578,7 @@ func Delete(c echo.Context) error {
}() }()
exists, err := db.Loads.GetLoadById(context.Background(), *uuid) 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") return handlers.NotFound(c, "load not found")
} }