Skip to content

Commit

Permalink
feat: error in notification silence
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe authored and moshloop committed Nov 13, 2024
1 parent 6d646ff commit 561a065
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions models/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ type NotificationSilence struct {
CreatedAt time.Time `json:"created_at" time_format:"postgres_timestamp" gorm:"<-:false"`
UpdatedAt time.Time `json:"updated_at" time_format:"postgres_timestamp" gorm:"<-:false"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`

// Error contains cel expression error in the filter
Error *string `json:"error,omitempty"`
}

func (n NotificationSilence) AsMap(removeFields ...string) map[string]any {
Expand Down
4 changes: 4 additions & 0 deletions schema/notifications.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ table "notification_silences" {
null = true
type = text
}
column "error" {
null = true
type = text
}
column "from" {
null = false
type = timestamptz
Expand Down

0 comments on commit 561a065

Please sign in to comment.