Include null team name in teams response (#824)

When a host does not have a team, return null rather than a missing
team_name attribute.
This commit is contained in:
Zach Wasserman 2021-05-20 12:27:36 -07:00 committed by GitHub
parent 82fe7c0035
commit 8ec938b272
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -157,7 +157,7 @@ type Host struct {
TeamID null.Int `json:"team_id" db:"team_id"`
// TeamName is the name of the team, loaded by JOIN to the teams table.
TeamName *string `json:"team_name,omitempty" db:"team_name"`
TeamName *string `json:"team_name" db:"team_name"`
// Loaded via JOIN in DB
PackStats []PackStats `json:"pack_stats"`
}