mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
fix(gateway): satisfy server-method lint
This commit is contained in:
@@ -46,7 +46,15 @@ import { resolveSessionKeyFromResolveParams } from "../sessions-resolve.js";
|
||||
import { assertValidParams } from "./validation.js";
|
||||
|
||||
function requireSessionKey(key: unknown, respond: RespondFn): string | null {
|
||||
const normalized = String(key ?? "").trim();
|
||||
const raw =
|
||||
typeof key === "string"
|
||||
? key
|
||||
: typeof key === "number"
|
||||
? String(key)
|
||||
: typeof key === "bigint"
|
||||
? String(key)
|
||||
: "";
|
||||
const normalized = raw.trim();
|
||||
if (!normalized) {
|
||||
respond(false, undefined, errorShape(ErrorCodes.INVALID_REQUEST, "key required"));
|
||||
return null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
import type { GatewayRequestHandlers, RespondFn } from "./types.js";
|
||||
import type { GatewayRequestHandlers } from "./types.js";
|
||||
import { defaultRuntime } from "../../runtime.js";
|
||||
import { WizardSession } from "../../wizard/session.js";
|
||||
import {
|
||||
|
||||
Reference in New Issue
Block a user