Plantings backend: plop CRUD, derived counts, removed_at (#14)
Build image / build-and-push (push) Successful in 7s

Co-authored-by: Steve Dudenhoeffer <[email protected]>
This commit was merged in pull request #33.
This commit is contained in:
2026-07-19 02:41:22 +00:00
committed by steve
parent e4505ed9a7
commit f4e5dab98c
10 changed files with 990 additions and 9 deletions
+7
View File
@@ -89,6 +89,13 @@ func New(cfg *config.Config, svc *service.Service) *gin.Engine {
objects := v1.Group("/objects", h.requireAuth())
objects.PATCH("/:id", h.updateObject)
objects.DELETE("/:id", h.deleteObject)
objects.POST("/:id/plantings", h.createPlanting) // place a plop in this object
// Plantings ("plops") are addressed by their own id; the service resolves the
// owning object/garden for the permission check.
plantings := v1.Group("/plantings", h.requireAuth())
plantings.PATCH("/:id", h.updatePlanting)
plantings.DELETE("/:id", h.deletePlanting)
// Plant catalog: built-ins (seeded, read-only) plus the actor's own rows.
plants := v1.Group("/plants", h.requireAuth())