From dc92a8af7d6949d7af35e9b9d49308786b585cb7 Mon Sep 17 00:00:00 2001 From: mbaharip <62494292+mbahArip@users.noreply.github.com> Date: Fri, 24 Jan 2025 17:43:50 +0700 Subject: [PATCH] update: Add dynamic configuration --- src/app/api/og/[encryptedId]/route.ts | 10 +++++++--- src/app/api/thumb/[encryptedId]/route.ts | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) 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;