This commit is contained in:
seb
2026-07-31 17:52:04 +02:00
parent 18ee68312f
commit 63df454861
5 changed files with 157 additions and 7 deletions

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

@@ -0,0 +1,16 @@
import { getStore } from './store.js';
export async function createUnderParent({ googleAuthId, parentId, name }) {
const store = await getStore();
return store.article.createUnderParent({ googleAuthId, parentId, name });
}
export async function getBySku(googleAuthId, sku) {
const store = await getStore();
return store.article.getBySku(googleAuthId, sku);
}
export async function updateBySku(googleAuthId, sku, data) {
const store = await getStore();
return store.article.updateBySku(googleAuthId, sku, data);
}

View File

@@ -14,3 +14,8 @@ export async function deleteCategory({ googleAuthId, id }) {
const store = await getStore();
await store.category.delete({ googleAuthId, id });
}
export async function getCategoryArticles(googleAuthId, categoryId) {
const store = await getStore();
return store.category.getCategoryArticles(googleAuthId, categoryId);
}