pub async fn delete_task(
__arg0: State<AppState>,
__arg1: Path<(i64, i64, i64)>,
) -> impl IntoResponse
Expand description
DELETE /api/modules/{module_id}/assignments/{assignment_id}/tasks/{task_id}
Delete a specific task from an assignment. Only accessible by lecturers or admins assigned to the module.
§Path Parameters
module_id
(i64): The ID of the module containing the assignmentassignment_id
(i64): The ID of the assignment containing the tasktask_id
(i64): The ID of the task to delete
§Responses
200 OK
{
"success": true,
"message": "Task deleted successfully"
}
404 Not Found
{
"success": false,
"message": "Assignment or module not found" // or "Task not found"
}
500 Internal Server Error
{
"success": false,
"message": "Database error" // or "Failed to delete task"
}