Skip to content

Commit 01a9aaa

Browse files
committed
fix: add revalidate
Signed-off-by: Innei <[email protected]>
1 parent a70f638 commit 01a9aaa

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/app/api/gh/[...all]/route.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { NextResponse } from 'next/server'
55
import type { NextRequest } from 'next/server'
66

77
export const runtime = 'edge'
8+
export const revalidate = 60 * 60 * 24 // 24 hours
89
export const GET = async (req: NextRequest) => {
910
const pathname = req.nextUrl.pathname.split('/').slice(3)
1011
const query = req.nextUrl.searchParams

src/app/api/tmdb/[...all]/route.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type { NextRequest } from 'next/server'
77
import { NextServerResponse } from '~/lib/edge-function.server'
88

99
export const runtime = 'edge'
10+
export const revalidate = 60 * 60 * 24 // 24 hours
1011
export const GET = async (req: NextRequest) => {
1112
const pathname = req.nextUrl.pathname.split('/').slice(3)
1213
const query = req.nextUrl.searchParams

0 commit comments

Comments
 (0)