Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gapidobri committed Aug 13, 2024
1 parent ffc35e1 commit 7da0294
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/service/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,10 @@ func (s *GameService) appendRowToGoogleSheets(
user dbModels.User,
prize *dbModels.Prize,
) error {
if game.GoogleSheetId == nil || game.GoogleSheetTabName == nil {
return nil
}

fields := []any{
participation.Id,
participation.CreatedAt.Format("02. 01. 2006 15:04"),
Expand All @@ -472,5 +476,5 @@ func (s *GameService) appendRowToGoogleSheets(
fields = append(fields, "/")
}

return s.sheetsClient.AppendRow(game.GoogleSheetId, game.GoogleSheetTabName, fields)
return s.sheetsClient.AppendRow(*game.GoogleSheetId, *game.GoogleSheetTabName, fields)
}

0 comments on commit 7da0294

Please sign in to comment.