Skip to main content

update_post

Function update_post 

Source
pub async fn update_post(
    post_id: i32,
    title: String,
    slug: Option<String>,
    summary: Option<String>,
    content_md: String,
    status: String,
    tags: Vec<String>,
    cover_image: Option<String>,
) -> Result<CreatePostResponse, ServerFnError>
Expand description

更新指定文章。

校验文章存在且属于当前 admin;处理 slug 变更、发布状态转换、标签同步, 并失效文章详情、列表、标签与统计缓存。

§Handler information

  • Method: post
  • Path: <auto>