Skip to content

Fix task bugs and add search filter - #30

Open
kanishk-aivar wants to merge 1 commit into
pavlinhristov:mainfrom
kanishk-aivar:codex/lab-fixes
Open

Fix task bugs and add search filter#30
kanishk-aivar wants to merge 1 commit into
pavlinhristov:mainfrom
kanishk-aivar:codex/lab-fixes

Conversation

@kanishk-aivar

Copy link
Copy Markdown

Summary

  • Fix GET /tasks status filtering so it matches the query value instead of the literal "status".
  • Persist task completion by writing the updated record back through save_tasks().
  • Add case-insensitive q search across title and description; it works with the status filter and is a no-op when omitted.

Test plan

  • curl "http://127.0.0.1:8000/tasks?status=open" returns only open tasks
  • curl "http://127.0.0.1:8000/tasks?status=done" returns only done tasks
  • curl -X POST http://127.0.0.1:8000/tasks/3/complete then GET /tasks/3 shows "status": "done" and a non-null completed_at
  • curl "http://127.0.0.1:8000/tasks?q=launch" matches title/description
  • curl "http://127.0.0.1:8000/tasks?status=open&q=plan" combines filters
  • Confirm data/tasks.json was not committed as test churn

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