pub async fn get_ticket(
__arg0: State<AppState>,
__arg1: Path<(i64, i64, i64)>,
__arg2: Extension<AuthUser>,
) -> impl IntoResponse
Expand description
GET /api/modules/{module_id}/assignments/{assignment_id}/tickets/{ticket_id}
Retrieve a specific ticket along with information about the user who created it. Accessible to users assigned to the module (e.g., student, tutor, lecturer).
§Path Parameters
module_id
(i64): The ID of the module containing the assignmentassignment_id
(i64): The ID of the assignment containing the ticketticket_id
(i64): The ID of the ticket to retrieve
§Responses
200 OK
{
"success": true,
"message": "Ticket with user retrieved",
"data": {
"ticket": {
"id": 101,
"assignment_id": 456,
"user_id": 789,
"title": "Issue with question 2",
"description": "I'm not sure what the question is asking.",
"status": "open",
"created_at": "2025-08-01T12:00:00Z",
"updated_at": "2025-08-01T12:30:00Z"
},
"user": {
"id": 789,
"username": "u23571561",
"email": "[email protected]",
"profile_picture_path": "uploads/users/789/profile.png"
}
}
}
403 Forbidden
{
"success": false,
"message": "Forbidden"
}
404 Not Found
{
"success": false,
"message": "Ticket not found"
}
500 Internal Server Error
{
"success": false,
"message": "Failed to retrieve ticket"
}