Skip to main content

yggdrasil/api/comments/
mod.rs

1//! 评论模块:提供评论的 CRUD、Markdown 渲染、审核状态流转与分页查询。
2//!
3//! 所有 Dioxus server function 均注册在 `/api` 路径下,供前端与服务端调用。
4//! 仅在 `feature = "server"` 启用的服务端构建中执行数据库操作与缓存失效。
5
6#![allow(clippy::unused_unit, deprecated, unused_imports)]
7
8mod check;
9mod create;
10mod helpers;
11mod list;
12mod markdown;
13mod read;
14mod types;
15mod update;
16
17/// 查询一组评论的当前审核状态。
18pub use check::check_pending_status;
19/// 创建一条新评论。
20pub use create::create_comment;
21/// 获取全部评论分页列表。
22pub use list::get_all_comments;
23/// 获取待审核评论总数。
24pub use list::get_pending_count;
25/// 获取指定文章的已审核评论列表。
26pub use read::get_comments;
27/// 评论 API 的请求与响应数据结构。
28pub use types::*;
29/// 通过指定评论。
30pub use update::approve_comment;
31/// 批量更新评论状态。
32pub use update::batch_update_comment_status;
33/// 将指定评论标记为垃圾评论。
34pub use update::spam_comment;
35/// 将指定评论移入回收站。
36pub use update::trash_comment;