feat(http): keep /search as alias for /query

This commit is contained in:
Tobi Lütke 2026-02-19 05:30:27 -05:00
parent 4649069e62
commit 07421de55f
No known key found for this signature in database

View File

@ -560,8 +560,8 @@ export async function startMcpHttpServer(port: number, options?: { quiet?: boole
}
// REST endpoint: POST /search — structured search without MCP protocol
// REST endpoint: POST /query — structured search without MCP protocol
if (pathname === "/query" && nodeReq.method === "POST") {
// REST endpoint: POST /query (alias: /search) — structured search without MCP protocol
if ((pathname === "/query" || pathname === "/search") && nodeReq.method === "POST") {
const rawBody = await collectBody(nodeReq);
const params = JSON.parse(rawBody);