From a5f53e48c4ddb244b6c2476e85e82f298e69e39a Mon Sep 17 00:00:00 2001 From: Kelvin Wang Date: Thu, 11 Apr 2019 12:29:25 -0400 Subject: [PATCH] fix(http): fix go vet issue --- http/dashboard_service.go | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/http/dashboard_service.go b/http/dashboard_service.go index 9d054f50fe..f3a1746f4f 100644 --- a/http/dashboard_service.go +++ b/http/dashboard_service.go @@ -140,10 +140,14 @@ type dashboardLinks struct { } type dashboardResponse struct { - platform.Dashboard - Cells []dashboardCellResponse `json:"cells"` - Labels []platform.Label `json:"labels"` - Links dashboardLinks `json:"links"` + ID platform.ID `json:"id,omitempty"` + OrganizationID platform.ID `json:"orgID,omitempty"` + Name string `json:"name"` + Description string `json:"description"` + Meta platform.DashboardMeta `json:"meta"` + Cells []dashboardCellResponse `json:"cells"` + Labels []platform.Label `json:"labels"` + Links dashboardLinks `json:"links"` } func (d dashboardResponse) toPlatform() *platform.Dashboard { @@ -174,9 +178,13 @@ func newDashboardResponse(d *platform.Dashboard, labels []*platform.Label) dashb Labels: fmt.Sprintf("/api/v2/dashboards/%s/labels", d.ID), Organization: fmt.Sprintf("/api/v2/orgs/%s", d.OrganizationID), }, - Dashboard: *d, - Labels: []platform.Label{}, - Cells: []dashboardCellResponse{}, + ID: d.ID, + OrganizationID: d.OrganizationID, + Name: d.Name, + Description: d.Description, + Meta: d.Meta, + Labels: []platform.Label{}, + Cells: []dashboardCellResponse{}, } for _, l := range labels {