From a610e17e485a35fec8095a8450f9415ff4b16860 Mon Sep 17 00:00:00 2001 From: tobyrushton Date: Thu, 15 Feb 2024 22:55:43 +0000 Subject: [PATCH 1/2] fix build error --- src/app/api/trpc/[trpc]/route.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/api/trpc/[trpc]/route.ts b/src/app/api/trpc/[trpc]/route.ts index 60b6af7..611330d 100644 --- a/src/app/api/trpc/[trpc]/route.ts +++ b/src/app/api/trpc/[trpc]/route.ts @@ -2,9 +2,7 @@ import { appRouter } from '@/server' import { createContext } from '@/server/context' import { fetchRequestHandler } from '@trpc/server/adapters/fetch' -export const config = { - runtime: 'edge', -} +export const runtime = 'edge' const handler = (req: Request): Promise => fetchRequestHandler({ From dbb8d70dc6dc26d4e5a1245c925f3de8c95b6ae0 Mon Sep 17 00:00:00 2001 From: tobyrushton Date: Fri, 16 Feb 2024 14:57:34 +0000 Subject: [PATCH 2/2] forced cron jobs to be rendered dynamicly --- src/app/api/cron/daily-db-scrape/route.ts | 2 ++ src/app/api/cron/weekly-db-scrape/route.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/app/api/cron/daily-db-scrape/route.ts b/src/app/api/cron/daily-db-scrape/route.ts index 1686ec1..5a64728 100644 --- a/src/app/api/cron/daily-db-scrape/route.ts +++ b/src/app/api/cron/daily-db-scrape/route.ts @@ -3,6 +3,8 @@ import { updateGameStats } from '@/server/functions/update-game-stats' import { updatePlayers } from '@/server/functions/update-player' import { updateSeasonAverages } from '@/server/functions/update-season-averages' +export const dynamic = 'force-dynamic' + // cron job to be ran daily export const GET = async (): Promise => { try { diff --git a/src/app/api/cron/weekly-db-scrape/route.ts b/src/app/api/cron/weekly-db-scrape/route.ts index 295be77..ea0124d 100644 --- a/src/app/api/cron/weekly-db-scrape/route.ts +++ b/src/app/api/cron/weekly-db-scrape/route.ts @@ -2,6 +2,8 @@ import { NextResponse } from 'next/server' import { updateTeams } from '@/server/functions/update-teams' import { updateSchedule } from '@/server/functions/update-schedule' +export const dynamic = 'force-dynamic' + // cron job to be ran weekly export const GET = async (): Promise => { try {