KI-AGENT: Mobile Kundenerfassung und Logbücher erweitern

This commit is contained in:
2026-09-08 21:50:31 +02:00
parent 1c39b69513
commit 5e1631e2d3
7 changed files with 621 additions and 27 deletions

View File

@@ -127,7 +127,10 @@ export default async function resourceHistoryRoutes(server: FastifyInstance) {
const data = await server.db
.select()
.from(historyitems)
.where(eq(column, parseId(id)))
.where(and(
eq(historyitems.tenant, req.user?.tenant_id),
eq(column, parseId(id))
))
.orderBy(asc(historyitems.createdAt));
const userIds = Array.from(