From ea2a3f74da9fab937e04ce8d939cda639c87b6f1 Mon Sep 17 00:00:00 2001 From: ShenQingchuan Date: Sun, 29 Mar 2026 00:22:16 +0800 Subject: [PATCH] fix(cron): remove omitempty from CronPayload.Type for consistent JSON Empty string and "message" are semantically equivalent defaults; always serializing the field avoids asymmetric JSON output. --- pkg/cron/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cron/service.go b/pkg/cron/service.go index 0cb4932e2..c1a224013 100644 --- a/pkg/cron/service.go +++ b/pkg/cron/service.go @@ -25,7 +25,7 @@ type CronSchedule struct { type CronPayload struct { Kind string `json:"kind"` - Type string `json:"type,omitempty"` // "message" (default) or "directive" + Type string `json:"type"` Message string `json:"message"` Command string `json:"command,omitempty"` Deliver bool `json:"deliver"`