fix: production demo hesaplarini temizle

This commit is contained in:
2026-08-10 12:20:35 +03:00
parent cf1982a299
commit 74f68815a7
+7
View File
@@ -17,6 +17,13 @@ async function runSeed() {
} }
async function main() { 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([ const [plans, users, ads] = await Promise.all([
prisma.plan.count(), prisma.plan.count(),
prisma.user.count(), prisma.user.count(),