Skip to main content

get_post_by_slug

Function get_post_by_slug 

Source
pub async fn get_post_by_slug(
    slug: String,
) -> Result<SinglePostResponse, ServerFnError>
Expand description

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

优先命中缓存;未命中时查询数据库,并附带基于 published_at 的上一篇/下一篇导航。

§Handler information

  • Method: post
  • Path: <auto>