Update api.ts, add transferBlockRef API

This commit is contained in:
Frostime 2023-06-14 15:19:34 +08:00 committed by GitHub
parent 6a6d7e2f03
commit cb7dd43525
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -241,6 +241,16 @@ export async function getChildBlocks(id: BlockId): Promise<ChildBlock[]> {
return request(url, data);
}
export async function transferBlockRef(fromID: BlockId, toID: BlockId, refIDs: BlockId[]) {
let data = {
fromID: fromID,
toID: toID,
refIDs: refIDs
}
let url = '/api/block/transferBlockRef';
return request(url, data);
}
// **************************************** Attributes ****************************************
export async function setBlockAttrs(id: BlockId, attrs: { [key: string]: string }) {
let data = {