Files
Content-Hunter_BE/test-anon.ts
Harun CAN dee6e29cfd
Some checks failed
Backend Deploy 🚀 / build-and-deploy (push) Has been cancelled
main
2026-03-14 14:01:01 +03:00

23 lines
558 B
TypeScript

import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function test() {
try {
const newAnon = await prisma.user.create({
data: {
email: 'anonymous@contenthunter.system' + Date.now(),
password: 'system-anonymous-no-login',
firstName: 'Anonymous',
},
});
console.log("Success:", newAnon);
} catch (e: any) {
console.error("Prisma Error:", e);
} finally {
await prisma.$disconnect();
}
}
test();