Align store calls with selected-company scoping and add entity numbers.
Drop companyId from company-scoped store wrappers and routes, add GET /entity/next-number plus optional number on entity create/update, and document dashdbschema API.md lookup in sibling-repos.
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { getStore } from './store.js';
|
||||
|
||||
export async function list(googleAuthId, companyId) {
|
||||
export async function list(googleAuthId) {
|
||||
const store = await getStore();
|
||||
return store.unit.list(googleAuthId, companyId);
|
||||
return store.unit.list(googleAuthId);
|
||||
}
|
||||
|
||||
export async function upsert(googleAuthId, companyId, data) {
|
||||
export async function upsert(googleAuthId, data) {
|
||||
const store = await getStore();
|
||||
return store.unit.upsert(googleAuthId, companyId, data);
|
||||
return store.unit.upsert(googleAuthId, data);
|
||||
}
|
||||
|
||||
export async function remove(googleAuthId, companyId, si) {
|
||||
export async function remove(googleAuthId, si) {
|
||||
const store = await getStore();
|
||||
return store.unit.delete(googleAuthId, companyId, si);
|
||||
return store.unit.delete(googleAuthId, si);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user