feat: cms event

This commit is contained in:
0x6d696b7566616e
2025-05-26 14:11:17 +07:00
parent 36c12110c2
commit 89cc631fb0
18 changed files with 711 additions and 2 deletions
+3 -1
View File
@@ -1,6 +1,7 @@
use axum::{
Extension, Router, middleware::from_fn, response::Redirect, routing::get,
};
use imphnen_cms::v1::landing::events::events_public_routes;
use imphnen_entities::{AppState, SurrealMemClient, SurrealWsClient};
use imphnen_gacha::gacha_router;
use imphnen_iam::{iam_protected_routes, iam_public_routes};
@@ -20,6 +21,7 @@ pub async fn gateway_service(
};
let public_routes = iam_public_routes();
let events_public_routes = events_public_routes();
let protected_routes = Router::new()
.merge(iam_protected_routes())
@@ -28,7 +30,7 @@ pub async fn gateway_service(
Router::new()
.route("/", get(Redirect::to("/docs")))
.nest("/v1", public_routes.merge(protected_routes))
.nest("/v1", public_routes.merge(protected_routes).merge(events_public_routes))
.merge(SwaggerUi::new("/docs").url("/openapi.json", docs_router()))
.layer(cors_middleware())
.layer(Extension(state))