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.
This commit is contained in:
ShenQingchuan 2026-03-29 00:22:16 +08:00
parent a58d15c91d
commit ea2a3f74da

View file

@ -25,7 +25,7 @@ type CronSchedule struct {
type CronPayload struct { type CronPayload struct {
Kind string `json:"kind"` Kind string `json:"kind"`
Type string `json:"type,omitempty"` // "message" (default) or "directive" Type string `json:"type"`
Message string `json:"message"` Message string `json:"message"`
Command string `json:"command,omitempty"` Command string `json:"command,omitempty"`
Deliver bool `json:"deliver"` Deliver bool `json:"deliver"`