API: no_project filter + project_id on tasks route

- list_notes(): add no_project param → Note.project_id.is_(None) filter
- GET /api/notes: expose ?no_project=true
- GET /api/tasks: add ?project_id= and ?no_project=true pass-through

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 20:04:03 -04:00
parent 404aba1461
commit 1c6d009603
3 changed files with 12 additions and 0 deletions
+2
View File
@@ -61,6 +61,7 @@ async def list_notes_route():
project_id = request.args.get("project_id", type=int)
milestone_id = request.args.get("milestone_id", type=int)
parent_id = request.args.get("parent_id", type=int)
no_project = request.args.get("no_project", "").lower() == "true"
# type= shorthand used by web frontend (?type=task or ?type=note)
type_param = request.args.get("type")
@@ -73,6 +74,7 @@ async def list_notes_route():
uid, q=q, tags=tag or None, is_task=is_task, sort=sort, order=order,
limit=limit, offset=offset,
project_id=project_id, milestone_id=milestone_id, parent_id=parent_id,
no_project=no_project,
)
return jsonify({"notes": [n.to_dict() for n in notes], "total": total})