feat: 优化项目目录结构
This commit is contained in:
16
apps/frontend/lib/api/admin/web/blog/update.ts
Normal file
16
apps/frontend/lib/api/admin/web/blog/update.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import fetcher from "@/lib/api/fetcher";
|
||||
import { BlogPermission } from "@/lib/types/Blog.Permission.enum";
|
||||
|
||||
type UpdateBlogParams = {
|
||||
title: string;
|
||||
description: string;
|
||||
contentUrl: string;
|
||||
permissions: BlogPermission[],
|
||||
}
|
||||
|
||||
export async function update(id: string, data: UpdateBlogParams) {
|
||||
return fetcher(`/api/admin/web/blog/${id}`, {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify(data)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user