pub async fn list_files(
__arg0: State<AppState>,
__arg1: Path<(i64, i64)>,
) -> Response
Expand description
GET /api/modules/{module_id}/assignments/{assignment_id}/files
List all files associated with an assignment. Accessible to users 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 list files for
§Responses
200 OK
{
"success": true,
"message": "Assignment files retrieved successfully",
"data": [
{
"id": "123",
"filename": "assignment.pdf",
"path": "module_456/assignment_789/assignment.pdf",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
]
}
404 Not Found
{
"success": false,
"message": "Assignment not found"
}
500 Internal Server Error
{
"success": false,
"message": "Database error" // or "Failed to retrieve files"
}