File tree Expand file tree Collapse file tree
src/app/api/admin/agents/[agentId] Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { NextRequest , NextResponse } from "next/server" ;
22
3- // Prioritize env variables, then fallback to default:
3+ // Prioritize env variables, then fallback to default
44const 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
1111export 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]
4040export 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+ }
You can’t perform that action at this time.
0 commit comments