This commit is contained in:
seb
2026-07-31 07:07:12 +02:00
parent db8b192094
commit 043305c04c
7 changed files with 219 additions and 10 deletions

21
src/db/company.js Normal file
View File

@@ -0,0 +1,21 @@
import { getStore } from './store.js';
export async function listCompanies(authId) {
const store = await getStore();
return store.company.list(authId);
}
export async function createCompany(authId, data) {
const store = await getStore();
return store.company.create({ ...data, authId });
}
export async function updateCompany(id, data) {
const store = await getStore();
return store.company.update(id, data);
}
export async function deleteCompany(companyId) {
const store = await getStore();
await store.company.delete(companyId);
}