feat(dimentorin): complete articles module - HTTP layer, routes, categories fix, seed
This commit is contained in:
@@ -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)),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user