Skip to main content

Module read

Module read 

Source
Expand description

文章详情查询接口。

提供按 id(管理员)与按 slug(公开)两种方式获取文章, 其中按 slug 查询包含上下篇导航并启用缓存。 Dioxus server function,注册在 /api 路径下。 仅在 feature = "server" 启用的服务端构建中查询数据库。

Functions§

get_post_by_id
根据文章 id 获取详情。
get_post_by_slug
根据 slug 获取公开文章详情。