Просмотр исходного кода

Merge pull request #3303 from utkarshcmu/db-update

Return correct updated+created timestamps to frontend
Torkel Ödegaard 10 лет назад
Родитель
Сommit
1fa8b74595
2 измененных файлов с 3 добавлено и 0 удалено
  1. 2 0
      pkg/api/dashboard.go
  2. 1 0
      pkg/api/dtos/models.go

+ 2 - 0
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,
 		},
 	}
 

+ 1 - 0
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 {