Commit 54f1e3b9 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Return tournament end time in listing operations if one exists.

parent 3bbb2675
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4,6 +4,9 @@ All notable changes to this project are documented below.
The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org).

## [Unreleased]
### Added
- Return tournament end time in listing operations if one exists.

### Changed
- Build with Go 1.13.8 release.

+6 −2
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ func TournamentList(ctx context.Context, logger *zap.Logger, db *sql.DB, leaderb
			canEnter = false
		}

		records = append(records, &api.Tournament{
		record := &api.Tournament{
			Id:          leaderboard.Id,
			Title:       leaderboard.Title,
			Description: leaderboard.Description,
@@ -308,7 +308,11 @@ func TournamentList(ctx context.Context, logger *zap.Logger, db *sql.DB, leaderb
			StartTime:   &timestamp.Timestamp{Seconds: leaderboard.StartTime},
			Duration:    uint32(leaderboard.Duration),
			StartActive: uint32(startActive),
		})
		}
		if leaderboard.EndTime != 0 {
			record.EndTime = &timestamp.Timestamp{Seconds: leaderboard.EndTime}
		}
		records = append(records, record)
	}

	tournamentList := &api.TournamentList{