pub async fn delete_assignment(
__arg0: State<AppState>,
__arg1: Path<(i64, i64)>,
) -> impl IntoResponse
Expand description
DELETE /api/modules/:module_id/assignments/:assignment_id
Delete a specific assignment and its associated files and folder. 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 to delete
§Responses
200 OK
{
"success": true,
"message": "Assignment 123 deleted successfully"
}
404 Not Found
{
"success": false,
"message": "No assignment found with ID 123 in module 456"
}
500 Internal Server Error
{
"success": false,
"message": "Database error details"
}