pub async fn delete_user(
__arg0: Path<i16>,
__arg1: State<Arc<AppState>>,
) -> Result<impl IntoResponse, (StatusCode, Json<Value>)>Expand description
Deletes a user account from the system.
Only admins can delete users (enforced by middleware). The User account and all associated data is removed.
Note: Tickets created by deleted users will have NULL user_id references.
§Arguments
Path(id):UserID to delete, extracted from URL pathState(data): Application state containingAppStatefor database access
§Returns
204 No Contenton successful deletion404 Not Foundif user doesn’t exist500 Internal Server Errorif database error occurs