split logs so that replay works for long games

This commit is contained in:
Zutatensuppe 2021-06-05 17:13:17 +02:00
parent 22f5ce0065
commit 514b3c6b22
10 changed files with 171 additions and 102 deletions

View file

@ -114,10 +114,9 @@ function connect(
async function requestReplayData(
gameId: string,
offset: number,
size: number
offset: number
): Promise<ReplayData> {
const args = { gameId, offset, size }
const args = { gameId, offset }
const res = await fetch(`/api/replay-data${Util.asQueryArgs(args)}`)
const json: ReplayData = await res.json()
return json