From 3f1317b2da8a7ff090fd57f53c4b1dee1e3e6920 Mon Sep 17 00:00:00 2001 From: luciano Date: Thu, 7 May 2026 15:47:19 +0200 Subject: [PATCH] revert: rimuovo logging diagnostico check-in (issue era falso positivo lato test) Il check-in salvava correttamente; il "DB vuoto" era un mio errore di parsing nello script che leggeva la DATABASE_URL dal .env con sed (non strippava bene gli apici single delle quotes), portandomi a interrogare un connection string malformato che falliva silenziosamente. Hash dei due env files erano effettivamente identici. Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/api/src/modules/tracking/check-in.routes.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/apps/api/src/modules/tracking/check-in.routes.ts b/apps/api/src/modules/tracking/check-in.routes.ts index 66905d5..19b4605 100644 --- a/apps/api/src/modules/tracking/check-in.routes.ts +++ b/apps/api/src/modules/tracking/check-in.routes.ts @@ -68,7 +68,6 @@ export const checkInRoutes: FastifyPluginAsync = async (fastify) => { const date = new Date(data.date); date.setHours(0, 0, 0, 0); - request.log.info({ userId, date, body: data }, '[check-in] upsert START'); const item = await fastify.prisma.dailyCheckIn.upsert({ where: { userId_date: { userId, date } }, create: { @@ -88,13 +87,6 @@ export const checkInRoutes: FastifyPluginAsync = async (fastify) => { notes: data.notes ?? null, }, }); - request.log.info({ id: item.id }, '[check-in] upsert OK'); - // Rilettura immediata per verificare che il record sia effettivamente - // persistito (catch silent rollback da middleware encryption). - const verify = await fastify.prisma.dailyCheckIn.findUnique({ - where: { userId_date: { userId, date } }, - }); - request.log.info({ found: verify != null, verifyId: verify?.id }, '[check-in] verify'); return reply.code(201).send({ item: { id: item.id } }); },