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,26 +1,26 @@
|
||||
import { getStore } from './store.js';
|
||||
|
||||
export async function list(googleAuthId, companyId) {
|
||||
export async function list(googleAuthId) {
|
||||
const store = await getStore();
|
||||
return store.customergroup.list(googleAuthId, companyId);
|
||||
return store.customergroup.list(googleAuthId);
|
||||
}
|
||||
|
||||
export async function create(googleAuthId, companyId, data) {
|
||||
export async function create(googleAuthId, data) {
|
||||
const store = await getStore();
|
||||
return store.customergroup.create(googleAuthId, companyId, data);
|
||||
return store.customergroup.create(googleAuthId, data);
|
||||
}
|
||||
|
||||
export async function update(googleAuthId, companyId, id, data) {
|
||||
export async function update(googleAuthId, id, data) {
|
||||
const store = await getStore();
|
||||
return store.customergroup.update(googleAuthId, companyId, id, data);
|
||||
return store.customergroup.update(googleAuthId, id, data);
|
||||
}
|
||||
|
||||
export async function order(googleAuthId, companyId, data) {
|
||||
export async function order(googleAuthId, data) {
|
||||
const store = await getStore();
|
||||
return store.customergroup.order(googleAuthId, companyId, data);
|
||||
return store.customergroup.order(googleAuthId, data);
|
||||
}
|
||||
|
||||
export async function remove(googleAuthId, companyId, id) {
|
||||
export async function remove(googleAuthId, id) {
|
||||
const store = await getStore();
|
||||
return store.customergroup.delete(googleAuthId, companyId, id);
|
||||
return store.customergroup.delete(googleAuthId, id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user