fix: preserve order dispatch mode
This commit is contained in:
@@ -77,6 +77,7 @@ type Order struct {
|
||||
Status string `json:"status"`
|
||||
StatusText string `json:"status_text"`
|
||||
Message string `json:"message"`
|
||||
DispatchMode string `json:"dispatch_mode,omitempty"`
|
||||
ScheduledMatchAt string `json:"scheduled_match_at,omitempty"`
|
||||
DispatchDelay int `json:"dispatch_delay_seconds,omitempty"`
|
||||
DeadlineAt string `json:"deadline_at"`
|
||||
@@ -397,6 +398,7 @@ func orderFromStore(row store.TaskOrder, detail bool) Order {
|
||||
DeadlineAt: row.DeadlineAt, CreatedAt: row.CreatedAt, UpdatedAt: row.UpdatedAt}
|
||||
var snapshot map[string]any
|
||||
if json.Unmarshal(row.RuleSnapshot, &snapshot) == nil {
|
||||
result.DispatchMode, _ = snapshot["dispatch_mode"].(string)
|
||||
result.ScheduledMatchAt, _ = snapshot["scheduled_match_at"].(string)
|
||||
result.DispatchDelay = intValue(snapshot["dispatch_delay_seconds"])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user