Skip to content

feat: add GET /things/get and POST /things/delete endpoints#32

Open
intagold561 wants to merge 1 commit into
tscircuit:mainfrom
intagold561:feat/add-get-and-delete-thing-endpoints
Open

feat: add GET /things/get and POST /things/delete endpoints#32
intagold561 wants to merge 1 commit into
tscircuit:mainfrom
intagold561:feat/add-get-and-delete-thing-endpoints

Conversation

@intagold561
Copy link
Copy Markdown

Summary\n\nAdds two missing CRUD endpoints for the things resource:\n\n### New Endpoints\n\n- GET /things/get?thing_id=ID — Retrieve a single thing by its ID. Returns 404 if not found.\n- POST /things/delete — Delete a thing by thing_id.\n\n### Changes\n\n- routes/things/get.ts — New endpoint with query param validation via zod\n- routes/things/delete.ts — New endpoint with JSON body validation via zod\n- lib/db/db-client.ts — Added removeThing(thing_id) method to the database store\n- tests/routes/things/get.test.ts — Tests for get endpoint (success + 404 case)\n- tests/routes/things/delete.test.ts — Tests for delete endpoint (success + non-existent thing)\n\nCloses #1

- Add GET /things/get endpoint to retrieve a single thing by thing_id
- Add POST /things/delete endpoint to remove a thing by thing_id
- Add removeThing method to database client
- Add comprehensive tests for both new endpoints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant