update stream card link

This commit is contained in:
2025-04-24 02:19:56 +02:00
parent 48c9bb9f73
commit dcee477c69

View File

@@ -98,9 +98,11 @@ export async function POST(req: NextRequest) {
const playerIds = payload.teams.map((p: any) => p[0].id) as string[]
console.log({ playerIds })
await syncHistory()
if ([RANKED_CHANNEL, VANILLA_CHANNEL].includes(payload.channel)) {
await leaderboardService.refreshLeaderboard(payload.channel)
}
await Promise.allSettled(
[RANKED_CHANNEL, VANILLA_CHANNEL].map((id) =>
leaderboardService.refreshLeaderboard(id)
)
)
await Promise.all(
playerIds.map(async (id) => {
await redis.del(PLAYER_STATE_KEY(id))