pub async fn delete_ticket(
__arg0: Path<i32>,
__arg1: State<Arc<AppState>>,
) -> Result<impl IntoResponse, (StatusCode, Json<Value>)>Expand description
Deletes a ticket by ID.
Only admins can delete tickets (enforced by middleware). Removes the TicketResponse and associated data from the database.
§Arguments
Path(id): Ticket ID to delete, extracted from URL pathState(data): Application state containingAppStatefor database access
§Returns
204 No Contenton successful deletion404 Not Foundif ticket doesn’t exist500 Internal Server Errorif database error occurs