Skip to content

Commit d683870

Browse files
committed
fix public event model
1 parent 0f34cb2 commit d683870

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

backend/src/models/event.go

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ type EventPublic struct {
8686
// Example: index 1 corresponds to monday, index 2 to tuesday, etc).
8787
// The themes can be "Software Engineer", "Security", "Gaming", etc.
8888
Themes []string `json:"themes" bson:"themes"`
89+
90+
CalendarUrl string `json:"calendarUrl" bson:"calendarUrl"`
8991
}
9092

9193
// DurationInDays returns the duration of the event in days.

backend/src/mongodb/event.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,12 @@ func (e *EventsType) GetCurrentEvent() (*models.Event, error) {
7878
func eventToPublic(event models.Event) *models.EventPublic {
7979

8080
public := models.EventPublic{
81-
ID: event.ID,
82-
Name: event.Name,
83-
Begin: event.Begin,
84-
End: event.End,
85-
Themes: event.Themes,
81+
ID: event.ID,
82+
Name: event.Name,
83+
Begin: event.Begin,
84+
End: event.End,
85+
Themes: event.Themes,
86+
CalendarUrl: event.CalendarUrl,
8687
}
8788

8889
return &public

0 commit comments

Comments
 (0)