pub async fn delete_ticket(
__arg0: State<AppState>,
__arg1: Path<(i64, i64, i64)>,
__arg2: Extension<AuthUser>,
) -> impl IntoResponse
Expand description
Deletes an existing ticket.
Endpoint: DELETE /modules/{module_id}/assignments/{assignment_id}/tickets/{ticket_id}
Permissions: Only the ticket owner can delete their ticket.
§Path parameters
module_id
→ ID of the module (used for permission check)assignment_id
→ ID of the assignment (unused in handler, kept for route consistency)ticket_id
→ ID of the ticket to be deleted
§Responses
200 OK
→ Ticket deleted successfully
{
"success": true,
"data": {},
"message": "Ticket deleted successfully"
}
403 Forbidden
→ User does not have permission to delete this ticket
{
"success": false,
"data": null,
"message": "Forbidden"
}
500 Internal Server Error
→ Failed to delete the ticket
{
"success": false,
"data": null,
"message": "Failed to delete ticket"
}