Skip to content

Commit

Permalink
add omitempty to created_at
Browse files Browse the repository at this point in the history
  • Loading branch information
almostinf committed Nov 13, 2023
1 parent 1d7c9f2 commit b906652
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion database/redis/reply/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type scheduledNotificationStorageElement struct {
Throttled bool `json:"throttled"`
SendFail int `json:"send_fail"`
Timestamp int64 `json:"timestamp"`
CreatedAt int64 `json:"created_at"`
CreatedAt int64 `json:"created_at,omitempty"`
}

func toScheduledNotificationStorageElement(notification moira.ScheduledNotification) scheduledNotificationStorageElement {
Expand Down
2 changes: 1 addition & 1 deletion datatypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ type ScheduledNotification struct {
Throttled bool `json:"throttled" example:"false"`
SendFail int `json:"send_fail" example:"0"`
Timestamp int64 `json:"timestamp" example:"1594471927" format:"int64"`
CreatedAt int64 `json:"created_at" example:"1594471900" format:"int64"`
CreatedAt int64 `json:"created_at,omitempty" example:"1594471900" format:"int64"`
}

type scheduledNotificationState int
Expand Down

0 comments on commit b906652

Please sign in to comment.