first (part 1: root files)
Deploy Iddaai Backend / build-and-deploy (push) Failing after 4s

This commit is contained in:
2026-04-16 15:09:10 +03:00
parent b4173c10bb
commit 7814e0bc6b
38 changed files with 18494 additions and 0 deletions
+74
View File
@@ -0,0 +1,74 @@
import { PrismaClient } from '@prisma/client';
import * as dotenv from 'dotenv';
dotenv.config();
// BigInt serialization fix
(BigInt.prototype as any).toJSON = function () {
return this.toString();
};
const prisma = new PrismaClient();
const matchIds = [
'7cnm7h7qbsq2bbaxngusojh90',
'7lmrfu2k1e2uxprxfxgaevcb8',
'3ko3otchy41d28rzxfpvl3d3o'
];
async function getMatches() {
for (const matchId of matchIds) {
try {
const match = await prisma.liveMatch.findUnique({
where: { id: matchId },
include: {
homeTeam: true,
awayTeam: true,
league: true,
},
});
if (!match) {
console.log(`\n❌ Maç bulunamadı: ${matchId}`);
continue;
}
console.log(`\n${'='.repeat(80)}`);
console.log(`📊 MAÇ: ${match.homeTeam?.name} vs ${match.awayTeam?.name}`);
console.log('='.repeat(80));
console.log(`ID: ${match.id}`);
console.log(`Lig: ${match.league?.name}`);
console.log(`Durum: ${match.state} / ${match.substate}`);
console.log(`Maç Zamanı (MS): ${match.mstUtc?.toString()}`);
console.log(`Hakem: ${match.refereeName || 'Bilinmiyor'}`);
console.log(`İlk 11 Var: ${match.lineups ? '✅' : '❌'}`);
console.log(`Sakat/Cezalı: ${match.sidelined ? '✅ Var' : '❌ Yok'}`);
// Lineups summary
if (match.lineups) {
const lineups = match.lineups as any;
if (lineups.home && lineups.home.xi) {
console.log(`\n🏠 EV SAHİBİ İLK 11 (${match.homeTeam?.name}):`);
lineups.home.xi.forEach((p: any) => {
console.log(` ${p.matchName} (${p.shirtNumber}) - ${p.position}`);
});
}
if (lineups.away && lineups.away.xi) {
console.log(`\n✈️ DEPLASMAN İLK 11 (${match.awayTeam?.name}):`);
lineups.away.xi.forEach((p: any) => {
console.log(` ${p.matchName} (${p.shirtNumber}) - ${p.position}`);
});
}
}
console.log('\n');
} catch (error) {
console.error(`❌ Hata (${matchId}):`, error);
}
}
await prisma.$disconnect();
}
getMatches();