Expand description
评论审核状态更新接口:通过、垃圾、删除与批量更新。
所有接口均需管理员身份,Leptos server function 注册在 /api 路径下。
状态变更后需要清空文章评论缓存、计数缓存与待审核计数缓存。
仅在 feature = "server" 启用的服务端构建中写入数据库。
Structs§
- Approve
Comment - Serialized arguments for the
approve_commentserver function. - Batch
Update Comment Status - Serialized arguments for the
batch_update_comment_statusserver function. - Restore
Comments - Serialized arguments for the
restore_commentsserver function. - Spam
Comment - Serialized arguments for the
spam_commentserver function. - Trash
Comment - Serialized arguments for the
trash_commentserver 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)。