Skip to content

Commit

Permalink
Merge pull request #425 from sinfo/fix-public-data
Browse files Browse the repository at this point in the history
Add missing public data
  • Loading branch information
PMax5 authored Mar 10, 2024
2 parents 1bd6988 + b8d1084 commit f8b6bf4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions backend/src/models/speaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ type SpeakerPublic struct {
// Title of the speaker (CEO @ HugeCorportation, for example).
Title string `json:"title" bson:"title"`

// Bio of the speaker. Careful, this will be visible on our website!
Bio string `json:"bio" bson:"bio"`

Images SpeakerImagesPublic `json:"imgs" bson:"imgs"`
Participations []SpeakerParticipationPublic `json:"participation" bson:"participations"`
}
1 change: 1 addition & 0 deletions backend/src/mongodb/speaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func speakerToPublic(speaker models.Speaker, eventID *int) (*models.SpeakerPubli
public := models.SpeakerPublic{
ID: speaker.ID,
Name: speaker.Name,
Bio: speaker.Bio,
Title: speaker.Title,
Images: models.SpeakerImagesPublic{
Speaker: speaker.Images.Speaker,
Expand Down
2 changes: 1 addition & 1 deletion backend/static/swagger.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions backend/swagger/models/public-speaker.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"title": {
"type": "string"
},
"bio": {
"type": "string"
},
"imgs": {
"type": "object",
"properties": {
Expand Down

0 comments on commit f8b6bf4

Please sign in to comment.