From 74d62ac1aab544af8cd2fea49852d1a136c69e64 Mon Sep 17 00:00:00 2001 From: frostime Date: Thu, 28 Dec 2023 22:42:58 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20add=20`foldBlock`=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/api.ts b/src/api.ts index 9a4ff3f..95c2816 100644 --- a/src/api.ts +++ b/src/api.ts @@ -224,6 +224,24 @@ export async function moveBlock(id: BlockId, previousID?: PreviousID, parentID?: } +export async function foldBlock(id: BlockId) { + let data = { + id: id + } + let url = '/api/block/foldBlock'; + return request(url, data); +} + + +export async function unfoldBlock(id: BlockId) { + let data = { + id: id + } + let url = '/api/block/unfoldBlock'; + return request(url, data); +} + + export async function getBlockKramdown(id: BlockId): Promise { let data = { id: id