fix: Add omitempty for proper latency type (#3850)

This was causing an error on the frontend, because this value can be nil!
This commit is contained in:
Kyle Carberry
2022-09-02 17:05:27 -05:00
committed by GitHub
parent 2e1db6cc63
commit ac50070713
3 changed files with 8 additions and 4 deletions

View File

@ -59,7 +59,7 @@ type WorkspaceAgent struct {
Version string `json:"version"`
Apps []WorkspaceApp `json:"apps"`
// DERPLatency is mapped by region name (e.g. "New York City", "Seattle").
DERPLatency map[string]DERPRegion `json:"latency"`
DERPLatency map[string]DERPRegion `json:"latency,omitempty"`
}
type WorkspaceAgentResourceMetadata struct {