feat: 创建博客时,不允许Slug为空

This commit is contained in:
2025-12-27 13:07:37 +08:00
parent 58b7f592fe
commit 2c76d1380f

View File

@@ -106,6 +106,9 @@ export async function createBlog(data: CreateBlogParams) {
if (data.description.length === 0) {
throw new APIError('描述不得为空')
}
if (data.slug.length === 0) {
throw new APIError('Slug不得为空')
}
if (data.contentUrl.length === 0) {
throw new APIError('文章链接不得为空')
}