fix(schema): keep template topics optional after trimming (#3247)

This commit is contained in:
Hampus
2026-10-07 01:42:37 +02:00
committed by GitHub
parent 154b65afe5
commit d7c00d4556
@@ -61,8 +61,8 @@ export const TemplateChannel = z.object({
topic: z topic: z
.string() .string()
.max(TEMPLATE_TOPIC_MAX_LENGTH) .max(TEMPLATE_TOPIC_MAX_LENGTH)
.transform(clipTopic)
.nullish() .nullish()
.transform((value) => (value == null ? value : clipTopic(value)))
.describe('The channel topic, shortened to the Fluxer channel topic limit'), .describe('The channel topic, shortened to the Fluxer channel topic limit'),
position: Int32Type.describe('The position of the channel'), position: Int32Type.describe('The position of the channel'),
parent_id: TemplateEntityId.nullish().describe('The template-local ID of the parent category'), parent_id: TemplateEntityId.nullish().describe('The template-local ID of the parent category'),