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,36 +1,36 @@
|
||||
import { getStore } from './store.js';
|
||||
|
||||
export async function list(googleAuthId, companyId) {
|
||||
export async function list(googleAuthId) {
|
||||
const store = await getStore();
|
||||
return store.posterminal.list(googleAuthId, companyId);
|
||||
return store.posterminal.list(googleAuthId);
|
||||
}
|
||||
|
||||
export async function upsert(googleAuthId, companyId, data) {
|
||||
export async function upsert(googleAuthId, data) {
|
||||
const store = await getStore();
|
||||
return store.posterminal.upsert(googleAuthId, companyId, data);
|
||||
return store.posterminal.upsert(googleAuthId, data);
|
||||
}
|
||||
|
||||
export async function remove(googleAuthId, companyId, id) {
|
||||
export async function remove(googleAuthId, id) {
|
||||
const store = await getStore();
|
||||
return store.posterminal.delete(googleAuthId, companyId, id);
|
||||
return store.posterminal.delete(googleAuthId, id);
|
||||
}
|
||||
|
||||
export async function setOn(googleAuthId, companyId, posterminalId, categoryId) {
|
||||
export async function setOn(googleAuthId, posterminalId, categoryId) {
|
||||
const store = await getStore();
|
||||
return store.posterminal.setOn(googleAuthId, companyId, posterminalId, categoryId);
|
||||
return store.posterminal.setOn(googleAuthId, posterminalId, categoryId);
|
||||
}
|
||||
|
||||
export async function setOff(googleAuthId, companyId, posterminalId, categoryId) {
|
||||
export async function setOff(googleAuthId, posterminalId, categoryId) {
|
||||
const store = await getStore();
|
||||
return store.posterminal.setOff(googleAuthId, companyId, posterminalId, categoryId);
|
||||
return store.posterminal.setOff(googleAuthId, posterminalId, categoryId);
|
||||
}
|
||||
|
||||
export async function setOnAll(googleAuthId, companyId, posterminalId) {
|
||||
export async function setOnAll(googleAuthId, posterminalId) {
|
||||
const store = await getStore();
|
||||
return store.posterminal.setOnAll(googleAuthId, companyId, posterminalId);
|
||||
return store.posterminal.setOnAll(googleAuthId, posterminalId);
|
||||
}
|
||||
|
||||
export async function setOffAll(googleAuthId, companyId, posterminalId) {
|
||||
export async function setOffAll(googleAuthId, posterminalId) {
|
||||
const store = await getStore();
|
||||
return store.posterminal.setOffAll(googleAuthId, companyId, posterminalId);
|
||||
return store.posterminal.setOffAll(googleAuthId, posterminalId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user