修复若干问题
This commit is contained in:
1 parent
be695cc742
commit
42eac84bb4
12 files changed
+581
-40
No files matched your search
@@ -163,3 +163,15 @@ export async function createComment(data: {
|
||||
export async function deleteComment(id: number): Promise<void> {
|
||||
await artalkMutate<void>(`/api/v2/comments/${id}`, "DELETE", { site_name: ARTALK_SITE });
|
||||
}
|
||||
|
||||
export async function updatePage(
|
||||
id: number,
|
||||
data: { key: string; title: string; admin_only?: boolean }
|
||||
): Promise<ArtalkPage> {
|
||||
return artalkMutate<ArtalkPage>(`/api/v2/pages/${id}`, "PUT", {
|
||||
key: data.key,
|
||||
title: data.title,
|
||||
admin_only: data.admin_only ?? false,
|
||||
site_name: ARTALK_SITE,
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user