Skip to content

Commit

Permalink
Join participation fields into one field when pushing to google sheets
Browse files Browse the repository at this point in the history
  • Loading branch information
gapidobri committed Aug 14, 2024
1 parent 1ff3458 commit 24c0179
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/service/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,11 @@ func (s *GameService) appendRowToGoogleSheets(
fields = append(fields, value)
}
fields = append(fields, participationMethod.Name)
var participationStrings []string
for _, value := range participation.Fields {
fields = append(fields, value)
participationStrings = append(participationStrings, fmt.Sprintf("%v", value))
}
fields = append(fields, strings.Join(participationStrings, ", "))
if prize != nil {
fields = append(fields, prize.Name)
} else {
Expand Down

0 comments on commit 24c0179

Please sign in to comment.