chore(deadcode): reuse gateway json responder · openclaw/openclaw@6c2c43d
vincentkoc
·
2026-06-21
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -31,6 +31,7 @@ import {
|
31 | 31 | resolveHookSessionKey, |
32 | 32 | resolveHookTargetAgentId, |
33 | 33 | } from "../hooks.js"; |
| 34 | +import { sendJson } from "../http-common.js"; |
34 | 35 | import { resolveRequestClientIp } from "../net.js"; |
35 | 36 | import { DEDUPE_MAX, DEDUPE_TTL_MS } from "../server-constants.js"; |
36 | 37 | |
@@ -63,12 +64,6 @@ type HookReplayScope = {
|
63 | 64 | dispatchScope: Record<string, unknown>; |
64 | 65 | }; |
65 | 66 | |
66 | | -function sendJson(res: ServerResponse, status: number, body: unknown) { |
67 | | -res.statusCode = status; |
68 | | -res.setHeader("Content-Type", "application/json; charset=utf-8"); |
69 | | -res.end(JSON.stringify(body)); |
70 | | -} |
71 | | - |
72 | 67 | function resolveMappedHookExternalContentSource(params: { |
73 | 68 | subPath: string; |
74 | 69 | payload: Record<string, unknown>; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。