Files
dashback/src/db/supplier.js

27 lines
827 B
JavaScript

import { getStore } from './store.js';
export async function list(googleAuthId) {
const store = await getStore();
return store.supplier.list(googleAuthId);
}
export async function create(googleAuthId, data) {
const store = await getStore();
return store.supplier.create(googleAuthId, data);
}
export async function update(googleAuthId, id, data) {
const store = await getStore();
return store.supplier.update(googleAuthId, id, data);
}
export async function remove(googleAuthId, id) {
const store = await getStore();
return store.supplier.delete(googleAuthId, id);
}
export async function listArticlesBySkus(googleAuthId, entityIdOrOptions, maybeSkus) {
const store = await getStore();
return store.articlesupplier.listByEntityAndSkus(googleAuthId, entityIdOrOptions, maybeSkus);
}