Skip to content

Commit 74d62ac

Browse files
committed
✨ feat: add foldBlock api
1 parent a2a615a commit 74d62ac

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/api.ts

+18
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,24 @@ export async function moveBlock(id: BlockId, previousID?: PreviousID, parentID?:
224224
}
225225

226226

227+
export async function foldBlock(id: BlockId) {
228+
let data = {
229+
id: id
230+
}
231+
let url = '/api/block/foldBlock';
232+
return request(url, data);
233+
}
234+
235+
236+
export async function unfoldBlock(id: BlockId) {
237+
let data = {
238+
id: id
239+
}
240+
let url = '/api/block/unfoldBlock';
241+
return request(url, data);
242+
}
243+
244+
227245
export async function getBlockKramdown(id: BlockId): Promise<IResGetBlockKramdown> {
228246
let data = {
229247
id: id

0 commit comments

Comments
 (0)