feat(dimentorin): complete articles module - HTTP layer, routes, categories fix, seed

This commit is contained in:
asepharyana
2026-08-04 19:16:45 +07:00
parent 7d1078f52a
commit 1d34d29b0b
15 changed files with 363 additions and 7 deletions
+7 -2
View File
@@ -6,8 +6,8 @@ use imphnen_cms::{
roadmap_public_routes, testimonials_protected_routes, testimonials_public_routes,
};
use imphnen_dimentorin::{
mentors_protected_routes, mentors_public_routes, sessions_protected_routes,
sessions_public_routes,
articles_protected_routes, articles_public_routes, mentors_protected_routes,
mentors_public_routes, sessions_protected_routes, sessions_public_routes,
};
use imphnen_gacha::gacha_router;
use imphnen_hackathon::hackathon_router;
@@ -74,10 +74,15 @@ pub async fn gateway_service(postgres_clients: PostgresClients) -> Router {
let dimentorin_routes = Router::new()
.merge(mentors_public_routes(db.clone(), Arc::clone(&state_arc)))
.merge(sessions_public_routes(db.clone()))
.merge(articles_public_routes(db.clone()))
.merge(
Router::new()
.merge(mentors_protected_routes(db.clone(), Arc::clone(&state_arc)))
.merge(sessions_protected_routes(db.clone(), Arc::clone(&state_arc)))
.merge(articles_protected_routes(
db.clone(),
Arc::clone(&state_arc),
))
.layer(from_fn(auth_middleware)),
);