I'll explain when you're older!
Some checks failed
🧪 ✨ Unit Tests Workflow / 🧪 📜 JavaScript Tests (push) Successful in 1m38s
🧪 ✨ Unit Tests Workflow / 🧪 🐹 GolangCI-Lint (push) Failing after 2m36s
🧪 ✨ Unit Tests Workflow / 🔍 🐹 Go Tests (push) Successful in 3m50s

This commit is contained in:
2025-06-10 08:36:02 -04:00
parent d1dc5897c5
commit 45b33d1ad8
6 changed files with 57 additions and 57 deletions

View File

@@ -87,12 +87,12 @@ func Delete(c echo.Context) error {
_ = db.Db.Close(context.Background())
}()
uid := handlers.ParseUuidOrBadRequest(c, c.Param("id"))
if uid == nil {
return nil
uid, err := handlers.ParseUuidOrBadRequest(c, c.Param("id"))
if err != nil || uid == nil {
return echo.NewHTTPError(http.StatusBadRequest, "invalid id")
}
err := db.Loads.DeleteCartridge(context.Background(), *uid)
err = db.Loads.DeleteCartridge(context.Background(), *uid)
if err != nil {
return err