Skip to content

Commit 58a82eb

Browse files
committed
Trying to fix breaking change introduced by Next.js 15
1 parent ca15329 commit 58a82eb

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • src/app/api/admin/agents/[agentId]

src/app/api/admin/agents/[agentId]/route.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { NextRequest, NextResponse } from "next/server";
22

3-
// Prioritize env variables, then fallback to default:
3+
// Prioritize env variables, then fallback to default
44
const BACKEND_URL =
55
process.env.LLAMASTACK_API_URL ||
66
process.env.BACKEND_URL ||
@@ -10,9 +10,9 @@ const BACKEND_URL =
1010
// GET /api/admin/agents/[agentId]/instructions
1111
export async function GET(
1212
request: NextRequest,
13-
{ params }: { params: { agentId: string } }
13+
{ params }: { params: Promise<{ agentId: string }> }
1414
) {
15-
const { agentId } = params;
15+
const { agentId } = await params;
1616

1717
try {
1818
const response = await fetch(
@@ -39,9 +39,9 @@ export async function GET(
3939
// DELETE /api/admin/agents/[agentId]
4040
export async function DELETE(
4141
request: NextRequest,
42-
{ params }: { params: { agentId: string } }
42+
{ params }: { params: Promise<{ agentId: string }> }
4343
) {
44-
const { agentId } = params;
44+
const { agentId } = await params;
4545

4646
try {
4747
const response = await fetch(
@@ -61,4 +61,4 @@ export async function DELETE(
6161
{ status: 500 }
6262
);
6363
}
64-
}
64+
}

0 commit comments

Comments
 (0)