31 lines
785 B
TypeScript
31 lines
785 B
TypeScript
import { prisma } from "../lib/prisma";
|
|
|
|
async function checkDb() {
|
|
try {
|
|
console.log("--- Notification Logs ---");
|
|
const nLogs = await prisma.notificationLog.findMany({
|
|
orderBy: { createdAt: 'desc' },
|
|
take: 5
|
|
});
|
|
console.log(JSON.stringify(nLogs, null, 2));
|
|
|
|
console.log("\n--- System Logs ---");
|
|
const sLogs = await prisma.systemLog.findMany({
|
|
orderBy: { createdAt: 'desc' },
|
|
take: 5
|
|
});
|
|
console.log(JSON.stringify(sLogs, null, 2));
|
|
|
|
console.log("\n--- Mailbox Mappings ---");
|
|
const mappings = await prisma.mailboxMapping.findMany();
|
|
console.log(JSON.stringify(mappings, null, 2));
|
|
|
|
} catch (error) {
|
|
console.error("DB Check failed:", error);
|
|
} finally {
|
|
await prisma.$disconnect();
|
|
}
|
|
}
|
|
|
|
checkDb();
|