From 54d99fbffdcaef143d258cb51fae865a3aa771d6 Mon Sep 17 00:00:00 2001 From: Evandro Fonseca Junior Date: Tue, 20 Jan 2026 21:13:34 -0300 Subject: [PATCH] fix(api): update parameter handling in GTM route to support promise resolution - Changed the parameter type in the GET function to a promise, ensuring proper resolution of the `id` before use. - Improved error handling by awaiting the parameters, enhancing the robustness of the API route. --- app/api/gtm/[id]/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/gtm/[id]/route.ts b/app/api/gtm/[id]/route.ts index 7496236..cf7852c 100644 --- a/app/api/gtm/[id]/route.ts +++ b/app/api/gtm/[id]/route.ts @@ -2,9 +2,9 @@ import { NextRequest, NextResponse } from 'next/server'; export async function GET( request: NextRequest, - { params }: { params: { id: string } } + { params }: { params: Promise<{ id: string }> } ) { - const { id } = params; + const { id } = await params; try { const response = await fetch(