Files
ContentGen_BE/test-db.js
T
Harun CAN a40619ef33
Backend Deploy 🚀 / build-and-deploy (push) Has been cancelled
main
2026-05-06 10:48:07 +02:00

20 lines
537 B
JavaScript

const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
async function check() {
const analyses = await prisma.youtubeAnalysis.findMany({
orderBy: { createdAt: 'desc' },
take: 5
});
console.log('Recent analyses:');
analyses.forEach(a => {
console.log(`[${a.createdAt}] ID: ${a.id}, VideoId: ${a.videoId}`);
const data = a.analysisData;
console.log(` Comment Count saved: ${data.commentCount}`);
});
}
check()
.catch(console.error)
.finally(() => prisma.$disconnect());