feat(frontend): migrate API calls to /api/v1 (Stage 1 PR5)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,26 +30,38 @@ export async function GET(
|
||||
request: NextRequest,
|
||||
{ params }: { params: Promise<{ path: string[] }> },
|
||||
) {
|
||||
return proxyRequest(request, `/api/memory/${(await params).path.join("/")}`);
|
||||
return proxyRequest(
|
||||
request,
|
||||
`/api/v1/memory/${(await params).path.join("/")}`,
|
||||
);
|
||||
}
|
||||
|
||||
export async function POST(
|
||||
request: NextRequest,
|
||||
{ params }: { params: Promise<{ path: string[] }> },
|
||||
) {
|
||||
return proxyRequest(request, `/api/memory/${(await params).path.join("/")}`);
|
||||
return proxyRequest(
|
||||
request,
|
||||
`/api/v1/memory/${(await params).path.join("/")}`,
|
||||
);
|
||||
}
|
||||
|
||||
export async function DELETE(
|
||||
request: NextRequest,
|
||||
{ params }: { params: Promise<{ path: string[] }> },
|
||||
) {
|
||||
return proxyRequest(request, `/api/memory/${(await params).path.join("/")}`);
|
||||
return proxyRequest(
|
||||
request,
|
||||
`/api/v1/memory/${(await params).path.join("/")}`,
|
||||
);
|
||||
}
|
||||
|
||||
export async function PATCH(
|
||||
request: NextRequest,
|
||||
{ params }: { params: Promise<{ path: string[] }> },
|
||||
) {
|
||||
return proxyRequest(request, `/api/memory/${(await params).path.join("/")}`);
|
||||
return proxyRequest(
|
||||
request,
|
||||
`/api/v1/memory/${(await params).path.join("/")}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@ async function proxyRequest(request: NextRequest, pathname: string) {
|
||||
}
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
return proxyRequest(request, "/api/memory");
|
||||
return proxyRequest(request, "/api/v1/memory");
|
||||
}
|
||||
|
||||
export async function DELETE(request: NextRequest) {
|
||||
return proxyRequest(request, "/api/memory");
|
||||
return proxyRequest(request, "/api/v1/memory");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user