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) <noreply@anthropic.com>
This commit is contained in:
1 parent
bf6be656bd
commit
3f1317b2da
1 file changed
-8
@@ -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 } });
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user