From 74f68815a7b731bd9843ca3363d48c1203491323 Mon Sep 17 00:00:00 2001 From: Hikmet Date: Mon, 10 Aug 2026 12:20:35 +0300 Subject: [PATCH] fix: production demo hesaplarini temizle --- prisma/seed-if-empty.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/prisma/seed-if-empty.ts b/prisma/seed-if-empty.ts index e4761a3..dc2e491 100644 --- a/prisma/seed-if-empty.ts +++ b/prisma/seed-if-empty.ts @@ -17,6 +17,13 @@ async function runSeed() { } async function main() { + if (process.env.ENABLE_DEMO_ACCOUNTS !== "true") { + const removed = await prisma.user.deleteMany({ + where: { email: { in: ["demo@winninghunter.local", "admin@winninghunter.local"] } } + }); + if (removed.count > 0) console.log(`🔒 ${removed.count} public demo account(s) removed.`); + } + const [plans, users, ads] = await Promise.all([ prisma.plan.count(), prisma.user.count(),