mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-06 21:34:28 -05:00
16 lines
571 B
TypeScript
16 lines
571 B
TypeScript
import * as SplatoonRotationRepository from "~/features/splatoon-rotations/SplatoonRotationRepository.server";
|
|
import { fetchRotations } from "~/features/splatoon-rotations/splatoon-rotations.server";
|
|
import { Routine } from "./routine.server";
|
|
|
|
export const SyncSplatoonRotationsRoutine = new Routine({
|
|
name: "SyncSplatoonRotations",
|
|
func: syncSplatoonRotations,
|
|
});
|
|
|
|
async function syncSplatoonRotations() {
|
|
if (import.meta.env.VITE_PROD_MODE !== "true") return;
|
|
|
|
const rotations = await fetchRotations();
|
|
await SplatoonRotationRepository.replaceAll(rotations);
|
|
}
|