pub async fn edit_ticket(
__arg0: Path<i32>,
__arg1: State<Arc<AppState>>,
__arg2: Json<TicketUpdateScheme>,
) -> Result<impl IntoResponse, (StatusCode, Json<Value>)>Expand description
Updates a ticket’s status.
Only admins can update ticket status (enforced by middleware). Applies TicketUpdateScheme to modify the TicketResponse.
This is typically used to transition tickets through their lifecycle (open → in_progress → resolved → archived).
§Arguments
Path(id): Ticket ID to update, extracted from URL pathState(data): Application state containingAppStatefor database accessJson(body):TicketUpdateSchemeupdate payload containing new status
§Returns
200 OKwith updatedTicketResponse500 Internal Server Errorif ticket not found or database error
§Typical Status Flow
open: Initial state, waiting for actionin_progress: Currently being worked onresolved: Issue fixedarchived: Closed/hidden from normal view