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:
seb
2026-08-07 06:22:13 +02:00
parent 2767568f5a
commit e6c24654dd
36 changed files with 496 additions and 189 deletions

View File

@@ -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.delivery.list(googleAuthId, companyId);
return store.delivery.list(googleAuthId);
}
export async function getById(googleAuthId, companyId, id) {
export async function getById(googleAuthId, id) {
const store = await getStore();
return store.delivery.getById(googleAuthId, companyId, id);
return store.delivery.getById(googleAuthId, id);
}
export async function create(googleAuthId, companyId, data) {
export async function create(googleAuthId, data) {
const store = await getStore();
return store.delivery.create(googleAuthId, companyId, data);
return store.delivery.create(googleAuthId, data);
}
export async function update(googleAuthId, companyId, id, data) {
export async function update(googleAuthId, id, data) {
const store = await getStore();
return store.delivery.update(googleAuthId, companyId, id, data);
return store.delivery.update(googleAuthId, id, data);
}
export async function remove(googleAuthId, companyId, id) {
export async function remove(googleAuthId, id) {
const store = await getStore();
return store.delivery.delete(googleAuthId, companyId, id);
return store.delivery.delete(googleAuthId, id);
}