use actix_web::web::ReqData; use actix_web::{get, web}; use crate::app::state::User; mod auth; mod layers; #[get("/me")] async fn me(user: ReqData) -> String { user.username.clone() } pub fn config(cfg: &mut web::ServiceConfig) { cfg.service(me) .service(web::scope("/auth").configure(auth::config)) .service(web::scope("/layers").configure(layers::config)); }