Files
ContentGen_BE/fix-scene.js
T
Harun CAN 7745102584
Backend Deploy 🚀 / build-and-deploy (push) Has been cancelled
main
2026-04-27 12:50:42 +02:00

34 lines
976 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const { PrismaClient } = require('./node_modules/@prisma/client');
const prisma = new PrismaClient();
async function main() {
const scene = await prisma.scene.findFirst({
where: {
projectId: "48dfda06-b425-434a-8120-0ebaaabecadc",
order: 3
}
});
if (scene) {
console.log("Old text:", scene.narrationText);
const newText = scene.narrationText.replace(/altı fit bir inç/g, 'bir metre seksen beş santim').replace(/6 fit 1 inç/g, '1.85 metre');
const newVisualPrompt = scene.visualPrompt.replace(/six feet one inch/ig, '185 centimeters').replace(/6 foot 1/ig, '185cm');
await prisma.scene.update({
where: { id: scene.id },
data: {
narrationText: newText,
visualPrompt: newVisualPrompt
}
});
console.log("Updated text:", newText);
} else {
console.log("Scene not found");
}
}
main()
.catch(e => console.error(e))
.finally(async () => {
await prisma.$disconnect();
});