fix(v03): route prestop drain through v1 dispatcher (#2004)
This commit is contained in:
@@ -661,7 +661,7 @@ async function handleRestAdapter(request, response, url, options) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.pathname === "/internal/workbench/drain") {
|
||||
if (url.pathname === "/v1/internal/workbench/drain") {
|
||||
if (request.method !== "POST") {
|
||||
sendJson(response, 405, { ok: false, error: { code: "method_not_allowed", message: "POST required." } });
|
||||
return;
|
||||
@@ -676,7 +676,7 @@ async function handleRestAdapter(request, response, url, options) {
|
||||
timeoutMs: parsePositiveInteger((options.env ?? process.env).HWLAB_WORKBENCH_SSE_DRAIN_TIMEOUT_MS, 2500),
|
||||
env: options.env ?? process.env
|
||||
});
|
||||
sendJson(response, 200, { ok: true, route: "/internal/workbench/drain", result });
|
||||
sendJson(response, 200, { ok: true, route: "/v1/internal/workbench/drain", result });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user