Skip to content

Commit

Permalink
Merge pull request #360 from MUzairS15/minor
Browse files Browse the repository at this point in the history
Lint fixes and more options for filter.
  • Loading branch information
Mohd Uzair authored Sep 5, 2023
2 parents a149db5 + 4837bb2 commit 4b8029d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
7 changes: 4 additions & 3 deletions models/events/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
)

func (e *Event) BeforeCreate(tx *gorm.DB) (err error) {
e.ID, _ = uuid.NewV4()
return
e.ID, _ = uuid.NewV4()
return
}

type EventBuilder struct {
Expand All @@ -23,6 +23,7 @@ func NewEvent() *EventBuilder {
event: Event{
CreatedAt: time.Now(),
OperationID: operationId,
Status: Unread,
},
}
}
Expand Down Expand Up @@ -58,7 +59,7 @@ func (e *EventBuilder) WithSeverity(severity EventSeverity) *EventBuilder {
return e
}

func (e *EventBuilder) WithStatus(status string) *EventBuilder {
func (e *EventBuilder) WithStatus(status EventStatus) *EventBuilder {
e.event.Status = status
return e
}
Expand Down
22 changes: 16 additions & 6 deletions models/events/events.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4b8029d

Please sign in to comment.