完成博客权限修改
This commit is contained in:
@@ -2,4 +2,5 @@ export * from './create';
|
||||
export * from './remove';
|
||||
export * from './list';
|
||||
export * from './update';
|
||||
export * from './get';
|
||||
export * from './get';
|
||||
export * from './setPassword';
|
||||
10
tone-page-web/lib/api/admin/web/blog/setPassword.ts
Normal file
10
tone-page-web/lib/api/admin/web/blog/setPassword.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import fetcher from "@/lib/api/fetcher";
|
||||
|
||||
export async function setPassword(id: string, password: string) {
|
||||
return fetcher<boolean>(`/api/admin/web/blog/${id}/password`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
password,
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user