You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
474 B

import { prisma } from "../src/services/db";
async function main() {
const id = BigInt(process.argv[2] || "258");
const mail = await prisma.mailMessage.findUnique({
where: { id },
include: { attachments: true, parseResult: true },
});
console.log(
JSON.stringify(
mail,
(_k, v) => (typeof v === "bigint" ? Number(v) : v),
2,
),
);
await prisma.$disconnect();
}
main().catch((e) => {
console.error(e);
process.exit(1);
});