pub async fn close_ticket(
__arg0: State<AppState>,
__arg1: Path<(i64, i64, i64)>,
__arg2: Extension<AuthUser>,
) -> impl IntoResponse
Expand description
Closes a ticket.
Endpoint: PUT /modules/{module_id}/assignments/{assignment_id}/tickets/{ticket_id}/close
Permissions: Must be the ticket owner or an authorized user.
§Path parameters
module_id
→ ID of the module containing the ticketassignment_id
→ ID of the assignment (unused in this handler, kept for path consistency)ticket_id
→ ID of the ticket to close
§Responses
200 OK
→ Ticket closed successfully
{
"success": true,
"data": { "id": 123, "status": "closed" },
"message": "Ticket closed successfully"
}
403 Forbidden
→ User is not authorized to close this ticket
{
"success": false,
"data": null,
"message": "User is not authorized to close this ticket"
}
500 Internal Server Error
→ Failed to update ticket status
{
"success": false,
"data": null,
"message": "Failed to close ticket"
}