From 7bb4b8d9c55b9336f3e95d92948c67a38987c60d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 20 Jun 2026 10:19:33 +0200 Subject: [PATCH] style: format the demo seed --- scripts/seed-demo.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/seed-demo.ts b/scripts/seed-demo.ts index 3f8c81164..0121964f2 100644 --- a/scripts/seed-demo.ts +++ b/scripts/seed-demo.ts @@ -126,8 +126,7 @@ function berlinHmAsUtc(hour: number, minute = 0, ref: Date = new Date()): Date { Number(parts.minute), Number(parts.second), ); - const offsetMs = - Math.round((localNowAsUtc - ref.getTime()) / 60000) * 60000; + const offsetMs = Math.round((localNowAsUtc - ref.getTime()) / 60000) * 60000; return new Date(localTargetAsUtc - offsetMs); } @@ -801,7 +800,9 @@ async function seed() { const takeMed1 = Math.random() > 0.02; if (takeMed1) { const takenTime = new Date(morningSlotFor); - takenTime.setMinutes(takenTime.getMinutes() + Math.floor(Math.random() * 45) + 1); + takenTime.setMinutes( + takenTime.getMinutes() + Math.floor(Math.random() * 45) + 1, + ); await client.query( `INSERT INTO medication_intake_events (id, user_id, medication_id, scheduled_for, taken_at, skipped, source, created_at, updated_at) VALUES ($1, $2, $3, $4, $5, false, 'WEB', $5, $5)`, @@ -819,7 +820,9 @@ async function seed() { const takeMed2 = Math.random() > 0.05; if (takeMed2) { const takenTime = new Date(morningSlotFor); - takenTime.setMinutes(takenTime.getMinutes() + Math.floor(5 + Math.random() * 50) + 1); + takenTime.setMinutes( + takenTime.getMinutes() + Math.floor(5 + Math.random() * 50) + 1, + ); await client.query( `INSERT INTO medication_intake_events (id, user_id, medication_id, scheduled_for, taken_at, skipped, source, created_at, updated_at) VALUES ($1, $2, $3, $4, $5, false, 'WEB', $5, $5)`, @@ -838,7 +841,9 @@ async function seed() { const takeMed3 = Math.random() > 0.06; if (takeMed3) { const takenTime = new Date(eveningSlotFor); - takenTime.setMinutes(takenTime.getMinutes() + Math.floor(Math.random() * 60) + 1); + takenTime.setMinutes( + takenTime.getMinutes() + Math.floor(Math.random() * 60) + 1, + ); await client.query( `INSERT INTO medication_intake_events (id, user_id, medication_id, scheduled_for, taken_at, skipped, source, created_at, updated_at) VALUES ($1, $2, $3, $4, $5, false, 'WEB', $5, $5)`,