u
This commit is contained in:
16
src/db/category.js
Normal file
16
src/db/category.js
Normal 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 });
|
||||
}
|
||||
Reference in New Issue
Block a user