Files
imphnen-backend-service/src/apps/v1/mod.rs
T

19 lines
463 B
Rust
Raw Normal View History

2025-03-15 01:53:20 +07:00
use axum::{middleware::from_fn, Router};
2025-02-03 21:53:42 +07:00
pub mod auth;
2025-03-14 17:50:37 +07:00
pub mod docs;
pub mod gacha;
2025-02-26 15:45:05 +07:00
pub mod users;
pub use auth::*;
2025-03-14 17:50:37 +07:00
pub use docs::*;
pub use gacha::*;
2025-02-26 15:45:05 +07:00
pub use users::*;
2025-02-03 21:53:42 +07:00
2025-02-25 02:00:19 +07:00
pub async fn routes() -> Router {
2025-03-15 01:53:20 +07:00
let public_routes = Router::new().nest("/auth", auth_router());
let protected_routes = Router::new()
2025-03-14 17:50:37 +07:00
.nest("/gacha", gacha_router())
2025-03-15 01:53:20 +07:00
.layer(from_fn(auth::auth_middleware::auth_middleware));
Router::new().merge(public_routes).merge(protected_routes)
2025-02-25 02:00:19 +07:00
}