async fn state_handler( state: AppState, filter: Option<String>, ) -> AppResult<Json<Value>>
Shared handler for state requests