sendou.ink/scripts/sync-splatoon-rotations.ts
Kalle fef1ffc955
Design refresh + a bunch of stuff (#2864)
Co-authored-by: hfcRed <hfcred@gmx.net>
2026-03-19 17:51:42 +02:00

20 lines
681 B
TypeScript

/** biome-ignore-all lint/suspicious/noConsole: CLI script */
import "dotenv/config";
import * as SplatoonRotationRepository from "~/features/splatoon-rotations/SplatoonRotationRepository.server";
import { fetchRotations } from "~/features/splatoon-rotations/splatoon-rotations.server";
async function main() {
console.log("Fetching splatoon rotations from splatoon3.ink...");
const rotations = await fetchRotations();
console.log(`Fetched ${rotations.length} rotations`);
await SplatoonRotationRepository.replaceAll(rotations);
console.log("Rotations synced to database");
}
main().catch((err) => {
console.error("Failed to sync rotations:", err);
process.exit(1);
});