Implement GET /todos to return all Todo items. Support optional query parameter completed=true|false to filter results. Response should be 200 OK with an array of Todo objects.
Acceptance Criteria:
- Returns 200 with an array of all todos when no filter is provided
- Returns 200 with only completed todos when ?completed=true
- Returns 200 with only incomplete todos when ?completed=false
- Empty array is returned when no matching todos exist
Test Cases:
- Integration: GET /todos returns all todos in descending createdAt order (or consistent order)
- Integration: GET /todos?completed=true returns only todos where completed is true
- Integration: GET /todos?completed=false returns only todos where completed is false
- Edge: GET /todos?completed=invalid returns 400 with JSON error
- Edge: GET /todos when no todos exist returns 200 and []
Implement GET /todos to return all Todo items. Support optional query parameter
completed=true|falseto filter results. Response should be 200 OK with an array of Todo objects.Acceptance Criteria:
Test Cases: