feat(trash): /api/trash blueprint + flip REST DELETE handlers to soft-delete
This commit is contained in:
@@ -300,8 +300,9 @@ async def delete_task_route(task_id: int):
|
||||
task_note, _ = result
|
||||
if not await can_write_note(uid, task_id):
|
||||
return jsonify({"error": "Permission denied"}), 403
|
||||
deleted = await delete_note(task_note.user_id, task_id)
|
||||
if not deleted:
|
||||
from fabledassistant.services.trash import delete as trash_delete
|
||||
batch = await trash_delete(task_note.user_id, "task", task_id)
|
||||
if batch is None:
|
||||
return not_found("Task")
|
||||
return "", 204
|
||||
|
||||
|
||||
Reference in New Issue
Block a user