feat: add roadmap CRUD module to CMS
New endpoints under /v1/landing/cms:
- GET /roadmap — public, paginated list
- GET /roadmap/detail/{id} — public, detail
- POST /roadmap/vote/{id} — public, increment votes
- POST /roadmap/create — protected (Administrator)
- PATCH /roadmap/update/{id} — protected (Administrator)
- DELETE /roadmap/delete/{id} — protected (Administrator)
Table: roadmap_items (id, title, description, status, votes, is_deleted, created_at, updated_at)
Status values: upcoming, in_progress, completed
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
6570bbf752
commit
db44c5a51f
@@ -2,8 +2,8 @@ use axum::{
|
||||
Extension, Router, middleware::from_fn, response::Redirect, routing::get,
|
||||
};
|
||||
use imphnen_cms::{
|
||||
events_protected_routes, events_public_routes, qr_router, testimonials_protected_routes,
|
||||
testimonials_public_routes,
|
||||
events_protected_routes, events_public_routes, qr_router, roadmap_protected_routes,
|
||||
roadmap_public_routes, testimonials_protected_routes, testimonials_public_routes,
|
||||
};
|
||||
use imphnen_dimentorin::{
|
||||
mentors_protected_routes, mentors_public_routes, sessions_protected_routes,
|
||||
@@ -62,10 +62,12 @@ pub async fn gateway_service(postgres_clients: PostgresClients) -> Router {
|
||||
let cms_routes = Router::new()
|
||||
.merge(testimonials_public_routes(db.clone()))
|
||||
.merge(events_public_routes(db.clone()))
|
||||
.merge(roadmap_public_routes(db.clone()))
|
||||
.merge(
|
||||
Router::new()
|
||||
.merge(events_protected_routes(db.clone()))
|
||||
.merge(testimonials_protected_routes(db.clone()))
|
||||
.merge(roadmap_protected_routes(db.clone()))
|
||||
.layer(from_fn(auth_middleware)),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user