Fix #53
Some checks failed
Build and Push Docker Images / build-backend (push) Successful in 33s
Build and Push Docker Images / build-frontend (push) Has been cancelled

This commit is contained in:
2026-01-13 14:24:04 +01:00
parent 32b4c40e11
commit 267648074c
3 changed files with 15 additions and 9 deletions

View File

@@ -22,7 +22,7 @@ export default async function staffTimeRoutes(server: FastifyInstance) {
server.post("/staff/time/event", async (req, reply) => {
try {
const userId = req.user.user_id
const actorId = req.user.user_id;
const tenantId = req.user.tenant_id
const body = req.body as any
@@ -35,17 +35,15 @@ export default async function staffTimeRoutes(server: FastifyInstance) {
const dataToInsert = {
tenant_id: tenantId,
user_id: userId,
user_id: body.user_id,
actortype: "user",
actoruser_id: userId,
actoruser_id: actorId,
eventtime: normalizeDate(body.eventtime),
eventtype: body.eventtype,
source: "WEB",
payload: body.payload // Payload (z.B. Description) mit speichern
}
console.log(dataToInsert)
const [created] = await server.db
.insert(stafftimeevents)
//@ts-ignore