changes
Deploy Iddaai Backend / build-and-deploy (push) Successful in 42s

This commit is contained in:
2026-05-20 10:10:28 +03:00
parent 1d4aa36602
commit 9481ad7094
9 changed files with 103 additions and 25 deletions
@@ -251,6 +251,10 @@ export class FeederPersistenceService {
if (existingLeague) {
// If exists with different ID, use existing ID to prevent constraint errors
finalLeagueId = existingLeague.id;
// Update sortOrder if changed
if (league.sortOrder !== undefined) {
await tx.$executeRaw`UPDATE leagues SET sort_order = ${league.sortOrder} WHERE id = ${finalLeagueId}`;
}
} else {
// Create new league
await tx.league.create({
@@ -261,8 +265,11 @@ export class FeederPersistenceService {
sport: sport,
competitionSlug: league.competitionSlug,
logoUrl: `/uploads/competitions/${finalLeagueId}.png`,
},
} as any,
});
if (league.sortOrder !== undefined) {
await tx.$executeRaw`UPDATE leagues SET sort_order = ${league.sortOrder} WHERE id = ${finalLeagueId}`;
}
}
}