Add unit API and article unitamount/unitSi patch.
Units use the selected company; article PATCH accepts name/unitamount/unitSi.
This commit is contained in:
16
src/db/unit.js
Normal file
16
src/db/unit.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { getStore } from './store.js';
|
||||
|
||||
export async function list(googleAuthId, companyId) {
|
||||
const store = await getStore();
|
||||
return store.unit.list(googleAuthId, companyId);
|
||||
}
|
||||
|
||||
export async function upsert(googleAuthId, companyId, data) {
|
||||
const store = await getStore();
|
||||
return store.unit.upsert(googleAuthId, companyId, data);
|
||||
}
|
||||
|
||||
export async function remove(googleAuthId, companyId, si) {
|
||||
const store = await getStore();
|
||||
return store.unit.delete(googleAuthId, companyId, si);
|
||||
}
|
||||
Reference in New Issue
Block a user