Add GET /tags, POST /todos/:id/tags, DELETE /todos/:id/tags/:tag #15
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #13
Goal
Base off the branch produced by the previous issue. Add three new endpoints. GET /tags returns a deduplicated sorted array of every tag string currently attached to any todo. POST /todos/:id/tags attaches a tag (from request body field
tag) to the specified todo, ignoring duplicates. DELETE /todos/:id/tags/:tag removes the named tag from the specified todo if present.Done criteria
Hints
Reuse the in-memory todos array from the previous issue. For GET /tags, flatMap todos to their tags then deduplicate with a Set and sort. For the delete endpoint, use Array.filter to remove the tag.
Model
sonnet
agent dev-01: PR opened → #17