feat(health): 文章管理 CRUD 补充 create/update/delete
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- article_dto 新增 CreateArticleReq/UpdateArticleReq 含 sanitize
- article_service 新增 create_article/update_article/delete_article 含审计日志
- article_handler 新增三个 handler 端点含权限校验
- module.rs 文章路由合并 POST/PUT/DELETE
This commit is contained in:
iven
2026-04-25 00:34:15 +08:00
parent 43e127d4f7
commit 994119ded1
4 changed files with 217 additions and 6 deletions

View File

@@ -221,11 +221,14 @@ impl HealthModule {
// 健康资讯
.route(
"/health/articles",
axum::routing::get(article_handler::list_articles),
axum::routing::get(article_handler::list_articles)
.post(article_handler::create_article),
)
.route(
"/health/articles/{id}",
axum::routing::get(article_handler::get_article),
axum::routing::get(article_handler::get_article)
.put(article_handler::update_article)
.delete(article_handler::delete_article),
)
}
}