pub async fn open_ticket(
__arg0: State<AppState>,
__arg1: Path<(i64, i64, i64)>,
__arg2: Extension<AuthUser>,
) -> impl IntoResponse
Expand description
Opens a ticket.
Endpoint: PUT /modules/{module_id}/assignments/{assignment_id}/tickets/{ticket_id}/open
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 open
§Responses
200 OK
→ Ticket opened successfully
{
"success": true,
"data": { "id": 123, "status": "open" },
"message": "Ticket opened successfully"
}
403 Forbidden
→ User is not authorized to open this ticket
{
"success": false,
"data": null,
"message": "User is not authorized to open this ticket"
}
500 Internal Server Error
→ Failed to update ticket status
{
"success": false,
"data": null,
"message": "Failed to open ticket"
}