mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-01 11:28:13 +03:00
21 lines
541 B
TypeScript
21 lines
541 B
TypeScript
import db from "external/mongo/db";
|
|
import CreateLogCtx from "lib/logger/logger";
|
|
import { TachiConfig } from "lib/setup/config";
|
|
|
|
const logger = CreateLogCtx(__filename);
|
|
|
|
if (require.main === module) {
|
|
(async () => {
|
|
for (const game of TachiConfig.GAMES) {
|
|
// eslint-disable-next-line no-await-in-loop
|
|
const res = await db.charts[game].update(
|
|
{ tierlistInfo: { $exists: false } },
|
|
{ $set: { tierlistInfo: {} } },
|
|
{ multi: true }
|
|
);
|
|
|
|
logger.info(`Added tierlistInfo to ${game}'s charts.`, { res });
|
|
}
|
|
})();
|
|
}
|