pub async fn delete_files(
__arg0: State<AppState>,
__arg1: Path<(i64, i64)>,
__arg2: Json<Value>,
) -> impl IntoResponse
Expand description
DELETE /api/modules/{module_id}/assignments/{assignment_id}/files
Delete one or more files from a specific assignment. Only accessible by lecturers assigned to the module.
§Path Parameters
module_id
(i64): The ID of the module containing the assignmentassignment_id
(i64): The ID of the assignment whose files are to be deleted
§Request Body (JSON)
file_ids
(array of i64): List of file IDs to delete. Must be a non-empty array.
§Responses
200 OK
{
"success": true,
"message": "Files removed successfully"
}
400 Bad Request
{
"success": false,
"message": "Request must include a non-empty list of file_ids"
}
404 Not Found
{
"success": false,
"message": "No assignment found with ID <assignment_id> in module <module_id>"
}
500 Internal Server Error
{
"success": false,
"message": "<database error details>"
}