mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 10:41:25 +00:00
refactor: split gateway server methods
This commit is contained in:
15
src/gateway/server-methods/connect.ts
Normal file
15
src/gateway/server-methods/connect.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { ErrorCodes, errorShape } from "../protocol/index.js";
|
||||
import type { GatewayRequestHandlers } from "./types.js";
|
||||
|
||||
export const connectHandlers: GatewayRequestHandlers = {
|
||||
connect: ({ respond }) => {
|
||||
respond(
|
||||
false,
|
||||
undefined,
|
||||
errorShape(
|
||||
ErrorCodes.INVALID_REQUEST,
|
||||
"connect is only valid as the first request",
|
||||
),
|
||||
);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user