mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-02 20:08:17 +03:00
21 lines
466 B
TypeScript
21 lines
466 B
TypeScript
import GetTableData from "../fetch-tables";
|
|
import { ChunkifyPromiseAll, GetScoresForMD5 } from "../util";
|
|
|
|
export default async function FetchAllTableScores() {
|
|
const tableInfo = await GetTableData();
|
|
|
|
const promises = [];
|
|
|
|
for (const table of tableInfo) {
|
|
for (const chart of table.charts) {
|
|
promises.push(() => GetScoresForMD5(chart.md5));
|
|
}
|
|
}
|
|
|
|
await ChunkifyPromiseAll(promises, 100);
|
|
}
|
|
|
|
if (require.main === module) {
|
|
void FetchAllTableScores();
|
|
}
|