From 616186824ca42de305c88a5f4dae1c07b733214e Mon Sep 17 00:00:00 2001 From: Apple Date: Fri, 28 Nov 2025 07:58:46 -0800 Subject: [PATCH] fix: Next.js 15 route handler params type --- apps/web/src/app/api/agents/[agentId]/visibility/route.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/web/src/app/api/agents/[agentId]/visibility/route.ts b/apps/web/src/app/api/agents/[agentId]/visibility/route.ts index 877b59e8..74c7aa29 100644 --- a/apps/web/src/app/api/agents/[agentId]/visibility/route.ts +++ b/apps/web/src/app/api/agents/[agentId]/visibility/route.ts @@ -4,10 +4,10 @@ const CITY_API_URL = process.env.INTERNAL_API_URL || process.env.CITY_API_BASE_U export async function PUT( request: NextRequest, - { params }: { params: { agentId: string } } + context: { params: Promise<{ agentId: string }> } ) { try { - const { agentId } = params; + const { agentId } = await context.params; const body = await request.json(); const response = await fetch(`${CITY_API_URL}/city/agents/${agentId}/visibility`, { @@ -37,4 +37,3 @@ export async function PUT( ); } } -