From 5559ad123883d75c4a32a2922b19f9b0b14e6b65 Mon Sep 17 00:00:00 2001 From: utkarshcmu Date: Sat, 21 Nov 2015 05:03:00 -0800 Subject: [PATCH] Return correct updated+created timestamps to frontend --- pkg/api/dashboard.go | 2 ++ pkg/api/dtos/models.go | 1 + 2 files changed, 3 insertions(+) diff --git a/pkg/api/dashboard.go b/pkg/api/dashboard.go index 8d7d3f6adfd..6490a118861 100644 --- a/pkg/api/dashboard.go +++ b/pkg/api/dashboard.go @@ -57,6 +57,8 @@ func GetDashboard(c *middleware.Context) { CanStar: c.IsSignedIn, CanSave: c.OrgRole == m.ROLE_ADMIN || c.OrgRole == m.ROLE_EDITOR, CanEdit: canEditDashboard(c.OrgRole), + Created: dash.Created, + Updated: dash.Updated, }, } diff --git a/pkg/api/dtos/models.go b/pkg/api/dtos/models.go index 9a4400adbdf..7af4c84f56d 100644 --- a/pkg/api/dtos/models.go +++ b/pkg/api/dtos/models.go @@ -40,6 +40,7 @@ type DashboardMeta struct { Slug string `json:"slug"` Expires time.Time `json:"expires"` Created time.Time `json:"created"` + Updated time.Time `json:"updated"` } type DashboardFullWithMeta struct {