Skip to content

Commit

Permalink
Merge pull request #366 from MUzairS15/minor
Browse files Browse the repository at this point in the history
change data type and add gorm tag
  • Loading branch information
Mohd Uzair authored Sep 12, 2023
2 parents c7a88da + 34d13a1 commit 979d953
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions models/events/build.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package events

import (
"encoding/json"
"time"

"github.com/gofrs/uuid"
)


type EventBuilder struct {
event Event
}
Expand Down Expand Up @@ -44,8 +42,7 @@ func (e *EventBuilder) WithAction(eventAction string) *EventBuilder {
}

func (e *EventBuilder) WithMetadata(metadata map[string]interface{}) *EventBuilder {
b, _ := json.Marshal(metadata)
e.event.Metadata = b
e.event.Metadata = metadata
return e
}

Expand Down
2 changes: 1 addition & 1 deletion models/events/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ func isEventStatusSupported(event *Event) error {
return fmt.Errorf("event status %s is not supported", event.Status)
}
return nil
}
}
4 changes: 2 additions & 2 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 979d953

Please sign in to comment.