edtech / apps /api /scripts /delete-user.ts
CognxSafeTrack
fix: batch scheduler updates, typed JWT user, log catch blocks, move script
2859b85
raw
history blame contribute delete
352 Bytes
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
console.log("Deleting user...");
const res = await prisma.user.deleteMany({
where: { phone: '221781476249' }
});
console.log("Deleted count:", res.count);
}
main().catch(console.error).finally(() => prisma.$disconnect());