diff --git a/src/app/api/og/[encryptedId]/route.ts b/src/app/api/og/[encryptedId]/route.ts index 5ae3139..cbcb3b1 100644 --- a/src/app/api/og/[encryptedId]/route.ts +++ b/src/app/api/og/[encryptedId]/route.ts @@ -4,13 +4,17 @@ import { encryptionService, gdrive } from "~/lib/utils.server"; import config from "config"; +export const dynamic = "force-dynamic"; + type Props = { - params: { + params: Promise<{ encryptedId: string; - }; + }>; }; -export async function GET(request: NextRequest, { params: { encryptedId } }: Props) { +export async function GET(request: NextRequest, { params }: Props) { + const { encryptedId } = await params; + try { const decryptedId = await encryptionService.decrypt(encryptedId); const { data } = await gdrive.files.get({ diff --git a/src/app/api/thumb/[encryptedId]/route.ts b/src/app/api/thumb/[encryptedId]/route.ts index 103499b..1b7472b 100644 --- a/src/app/api/thumb/[encryptedId]/route.ts +++ b/src/app/api/thumb/[encryptedId]/route.ts @@ -6,6 +6,8 @@ import { encryptionService } from "~/lib/utils.server"; import config from "config"; +export const dynamic = "force-dynamic"; + type Props = { params: Promise<{ encryptedId: string;