is_finished status to true.
Endpoint
Request Body
The ID of the task to mark as finished.
Response
Returns
"Worked!" when the task is successfully marked as finished.Returns
"Invalid!" if the operation fails (e.g., task not found).Example Request
Response Example
Error Response
Behavior Notes
This endpoint only sets
is_finished to true. It does not modify other task fields like status, dueAt, or taskColumn.After successfully finishing a task, emit a
database-change event via Socket.io to notify other clients. See Real-time Updates for details.Database Update
The endpoint performs the following Prisma update:Common Use Cases
Complete a Task After Delivery
Bulk Complete Multiple Tasks
Related Endpoints
- Get Tasks - Retrieve all tasks (including
is_finishedstatus) - Create Task - Update task fields (alternative to set
is_finished) - Delete Task - Permanently remove a task
Source Reference
Implementation:src/routes/api/(tasks-clients)/finishUserTask/+server.ts:5