chore(scripts): apply prettier to the phantom-med cleanup script

Formatting only; the format:check gate flagged the file. No behaviour change.
This commit is contained in:
Marc-André Bombeck committed 2026-07-24 23:18:26 +02:00
1 parent 1007ca3d1c
commit 40aae4b66d
1 file changed
+11 -3
+11 -3
View File
@@ -66,7 +66,9 @@ async function main(): Promise<void> {
deletable.push({ id: m.id, userId: m.userId });
}
console.log(`\n=== cleanup plan for name "${name}" (externalSource APPLE_HEALTH) ===`);
console.log(
`\n=== cleanup plan for name "${name}" (externalSource APPLE_HEALTH) ===`,
);
console.log(`candidates found: ${candidates.length}`);
console.log(`safe to delete: ${deletable.length}`);
console.log(`preserved (intake/schedule present): ${skipped.length}`);
@@ -103,7 +105,11 @@ async function main(): Promise<void> {
await prisma.medication.delete({ where: { id } });
await auditLog("medication.delete", {
userId,
details: { medicationId: id, name, reason: "apple_health_phantom_cleanup" },
details: {
medicationId: id,
name,
reason: "apple_health_phantom_cleanup",
},
});
affectedUsers.add(userId);
deleted += 1;
@@ -113,7 +119,9 @@ async function main(): Promise<void> {
invalidateUserMedications(userId, { evict: true });
}
console.log(`\nDone. Deleted ${deleted} row(s) across ${affectedUsers.size} user(s).`);
console.log(
`\nDone. Deleted ${deleted} row(s) across ${affectedUsers.size} user(s).`,
);
console.log(
"Caches were busted for the affected users; a page refresh reflects the change.",
);