Skip to main content

Module update

Module update 

Source
Expand description

评论审核状态更新接口:通过、垃圾、删除与批量更新。

所有接口均需管理员身份,Leptos server function 注册在 /api 路径下。 状态变更后需要清空文章评论缓存、计数缓存与待审核计数缓存。 仅在 feature = "server" 启用的服务端构建中写入数据库。

Structs§

ApproveComment
Serialized arguments for the approve_comment server function.
BatchUpdateCommentStatus
Serialized arguments for the batch_update_comment_status server function.
RestoreComments
Serialized arguments for the restore_comments server function.
SpamComment
Serialized arguments for the spam_comment server function.
TrashComment
Serialized arguments for the trash_comment server function.

Functions§

approve_comment
通过指定评论。
approve_comment_impl 🔒
通过评论并递归通过其 pending 祖先;评论不存在返回 Ok(false)。
batch_update_comment_status
批量更新评论状态。
restore_comments
从回收站恢复评论:清除软删除并回到待审,由管理员重新决定是否通过。
spam_comment
将指定评论标记为垃圾评论。
spam_comment_impl 🔒
将评论标记为垃圾;评论不存在返回 Ok(false)。仅旧状态为 approved 时失效评论缓存。
trash_comment
将指定评论移入回收站(软删除)。
trash_comment_impl 🔒
将评论移入回收站(软删除);评论不存在返回 Ok(false)。