Skip to main content

Module posts

Module posts 

Source
Expand description

文章 CRUD 相关接口。 文章模块:提供文章的 CRUD、列表、搜索、标签聚合与统计等 server function。

所有 Dioxus server function 均注册在 /api 路径下,供前端与服务端调用。 仅在 feature = "server" 启用的服务端构建中执行数据库操作与缓存失效。

Re-exports§

pub use create::create_post;
pub use delete::delete_post;
pub use list::list_deleted_posts;
pub use list::list_posts;
pub use list::get_posts_by_tag;
pub use list::list_published_posts;
pub use read::get_post_by_id;
pub use read::get_post_by_slug;
pub use rebuild::rebuild_content_html;
pub use rebuild::rebuild_post_content_html;
pub use search::search_posts;
pub use stats::get_post_stats;
pub use tags::list_tags;
pub use trash::batch_purge_posts;
pub use trash::batch_restore_posts;
pub use trash::empty_trash;
pub use trash::purge_post;
pub use trash::restore_post;
pub use update::update_post;
pub use types::*;

Modules§

create 🔒
创建文章接口。
delete 🔒
删除文章接口。
helpers 🔒
文章模块内部辅助函数。
list 🔒
文章列表查询接口。
read 🔒
文章详情查询接口。
rebuild 🔒
批量重建文章 HTML 与目录。
search 🔒
文章全文搜索接口。
stats 🔒
文章统计接口。
tags 🔒
标签列表接口。
trash 🔒
回收站操作接口:恢复、彻底删除、批量操作与一键清空。
types 🔒
文章 API 的请求与响应数据结构。
update 🔒
更新文章接口。