This commit is contained in:
seb
2026-07-31 09:12:36 +02:00
parent 52355aba4a
commit 18ee68312f
4 changed files with 124 additions and 2 deletions

16
src/db/category.js Normal file
View File

@@ -0,0 +1,16 @@
import { getStore } from './store.js';
export async function getTreeForCompany(googleAuthId, companyId) {
const store = await getStore();
return store.category.getTreeForCompany(googleAuthId, companyId);
}
export async function createUnderParent({ googleAuthId, parentId, name }) {
const store = await getStore();
return store.category.createUnderParent({ googleAuthId, parentId, name });
}
export async function deleteCategory({ googleAuthId, id }) {
const store = await getStore();
await store.category.delete({ googleAuthId, id });
}