Files
fahricansecer 7814e0bc6b
Deploy Iddaai Backend / build-and-deploy (push) Failing after 4s
first (part 1: root files)
2026-04-16 15:09:10 +03:00

52 lines
1.3 KiB
TypeScript
Raw Permalink 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.
import { PrismaClient } from '@prisma/client';
import * as dotenv from 'dotenv';
dotenv.config();
const prisma = new PrismaClient();
// BigInt serialization fix
(BigInt.prototype as any).toJSON = function () {
return this.toString();
};
async function getMatch() {
try {
const match = await prisma.liveMatch.findUnique({
where: { id: '3kemwubzpmga0nwhtc0o0vgno' },
include: {
homeTeam: true,
awayTeam: true,
league: true,
},
});
if (!match) {
console.log('❌ Maç bulunamadı!');
return;
}
console.log('✅ Maç bulundu:');
console.log(JSON.stringify(match, null, 2));
// Maç bilgilerini özetle
console.log('\n📊 MAÇ ÖZETİ:');
console.log('ID:', match.id);
console.log('Slug:', match.matchSlug);
console.log('Ev sahibi:', match.homeTeam?.name);
console.log('Deplasman:', match.awayTeam?.name);
console.log('Lig:', match.league?.name);
console.log('Durum:', match.status);
console.log('Spor:', match.sport);
console.log('Maç Zamanı (MS):', match.mstUtc?.toString());
console.log('Skor:', match.scoreHome, '-', match.scoreAway);
} catch (error) {
console.error('❌ Hata:', error);
} finally {
await prisma.$disconnect();
}
}
getMatch();