Skip to main content

Module create

Module create 

Source
Expand description

创建文章接口。

校验标题、内容与 slug,生成唯一 slug 并渲染 Markdown, 在事务中写入 posts 表并同步标签关联,最后失效相关缓存。 Dioxus server function,注册在 /api 路径下。 仅在 feature = "server" 启用的服务端构建中写入数据库。

Functions§

create_post
创建一篇新文章。