move space logic to zustand
This commit is contained in:
@@ -386,7 +386,7 @@ export async function getBlocks(account_id: number) {
|
||||
}
|
||||
|
||||
// create block
|
||||
export async function createBlock(
|
||||
export async function addBlockToDB(
|
||||
account_id: number,
|
||||
kind: number,
|
||||
title: string,
|
||||
@@ -398,3 +398,8 @@ export async function createBlock(
|
||||
[account_id, kind, title, content],
|
||||
);
|
||||
}
|
||||
|
||||
export async function removeBlockFromDB(id: string) {
|
||||
const db = await connect();
|
||||
return await db.execute(`DELETE FROM blocks WHERE id = "${id}";`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user