fix: preserve agent id casing

This commit is contained in:
Peter Steinberger
2026-01-24 12:23:11 +00:00
parent 49c518951c
commit fa746b05de
5 changed files with 23 additions and 25 deletions

View File

@@ -1,4 +1,3 @@
import { normalizeAgentId } from "../routing/session-key.js";
import { parseAbsoluteTimeMs } from "./parse.js";
import { migrateLegacyCronPayload } from "./payload-migration.js";
import type { CronJobCreate, CronJobPatch } from "./types.js";
@@ -76,7 +75,7 @@ export function normalizeCronJobInput(
next.agentId = null;
} else if (typeof agentId === "string") {
const trimmed = agentId.trim();
if (trimmed) next.agentId = normalizeAgentId(trimmed);
if (trimmed) next.agentId = trimmed;
else delete next.agentId;
}
}