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.
This commit is contained in:
Evandro Fonseca Junior committed 2026-01-20 21:13:34 -03:00
1 parent c9b057b674
commit 54d99fbffd
1 file changed
+2 -2
+2 -2
View File
@@ -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(