Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .bass/issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Implement Create Todo endpoint (POST /todos)

Implement POST /todos to create a new Todo item. Request body must contain `title` (string, non-empty). Response should be 201 Created with the full Todo object.

Acceptance Criteria:
- Returns 201 and the created Todo on success
- Returns 400 if title is missing, null, or empty string
- createdAt and updatedAt are set automatically

Test Cases:
- Integration: POST /todos with { "title": "Buy milk" } returns 201 and a Todo object with id, title, completed=false, createdAt, updatedAt
- Integration: POST /todos with { "title": "" } returns 400 with JSON error
- Integration: POST /todos with {} returns 400 with JSON error
- Edge: POST /todos with extra fields ignores them and still creates the Todo

Please implement this fix.
1 change: 1 addition & 0 deletions node_modules/.bin/uuid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading