Add avatars to match intro and final score audience views.

This commit is contained in:
Patrick Fairbank
2018-09-18 00:36:25 -07:00
parent 7297dc4146
commit c9e7640a28
7 changed files with 117 additions and 10 deletions

View File

@@ -295,6 +295,9 @@ func (web *Web) getOfficialTeamInfo(teamId int) (*model.Team, error) {
}
}
// Download and store the team's avatar; if there isn't one, ignore the error.
web.arena.TbaClient.DownloadTeamAvatar(teamId, time.Now().Year())
// Use those variables to make a team object
team = model.Team{Id: teamId, Name: tbaTeam.Name, Nickname: tbaTeam.Nickname, City: tbaTeam.City,
StateProv: tbaTeam.StateProv, Country: tbaTeam.Country, RookieYear: tbaTeam.RookieYear,