mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
The checked made no sense as VITE_PROD_MODE is not set in prod and we already have a guard against running routines in dev (in entry.server.tsx)
14 lines
514 B
TypeScript
14 lines
514 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() {
|
|
const rotations = await fetchRotations();
|
|
await SplatoonRotationRepository.replaceAll(rotations);
|
|
}
|