Description
Currently anyone can see all tasks. Add an owner_id query param to GET /tasks/ so a frontend can fetch only a specific user's tasks.
What to do
Acceptance Criteria
GET /tasks/?owner_id=1 returns only tasks belonging to user 1
GET /tasks/ (no param) returns all tasks
- Returns an empty list (not an error) if the user has no tasks
Difficulty
🟡 Intermediate
Description
Currently anyone can see all tasks. Add an
owner_idquery param toGET /tasks/so a frontend can fetch only a specific user's tasks.What to do
owner_id: Optional[int] = Nonequery param toGET /tasks/.filter(Task.owner_id == owner_id)crud.pyto acceptowner_idas an optional argumentAcceptance Criteria
GET /tasks/?owner_id=1returns only tasks belonging to user 1GET /tasks/(no param) returns all tasksDifficulty
🟡 Intermediate