use std::sync::Arc; use axum::{ Router, extract::{Path, State}, routing::{get, post}, }; use super::{dto::CreateVoteRequest, service::VoteService}; pub fn router(service: Arc) -> Router { Router::new() .route("/votes", get(list)) .route("/votes/{id}", get(get_by_id)) .route("/votes", post(create)) .with_state(service) } async fn list(State(service): State>) { todo!() } async fn get_by_id(State(service): State>, Path(id): Path) { todo!() } async fn create(State(service): State>, body: axum::Json) { todo!() }