pub async fn get_post_by_slug(
slug: String,
) -> Result<SinglePostResponse, ServerFnError>Expand description
根据 slug 获取公开文章详情。
优先命中缓存;未命中时查询数据库,并附带基于 published_at 的上一篇/下一篇导航。
§Handler information
- Method:
post - Path:
<auto>
pub async fn get_post_by_slug(
slug: String,
) -> Result<SinglePostResponse, ServerFnError>根据 slug 获取公开文章详情。
优先命中缓存;未命中时查询数据库,并附带基于 published_at 的上一篇/下一篇导航。
post<auto>