feat(blog::api) get_identifier.rs

This commit is contained in:
lumither committed 2025-05-13 17:09:55 +08:00
1 parent dc2c294617
commit 2f6cafa543
11 files changed
+208 -38

No files matched your search

+3 -5
View File
@@ -5,7 +5,7 @@ use crate::{
modules::{
Module,
blog::{
api::{posts, posts::pagination},
api::{posts, posts::get, posts::pagination},
components::{check_update, consistency_guard},
},
},
@@ -27,11 +27,9 @@ impl Module for Blog {
// todo: move resource init to new func
// todo: remove debug comment
Router::new()
// .route("/get_post_list", get(get_post_list))
// .route("/posts/pagination", get(...))
// .route("/posts", get(...)) // get posts
.route("/posts", get(get::handler))
.route("/posts/{identifier}", get(posts::get_identifier::handler))
.route("/posts/pagination", get(pagination::handler))
.route("/posts/{identifier}", get(posts::get::handler))
.with_state(db_handler)
}