Successfully displayed userdId in UI
This commit is contained in:
@@ -33,8 +33,7 @@ type Dashboard struct {
|
||||
Created time.Time
|
||||
Updated time.Time
|
||||
|
||||
CreatedBy string
|
||||
UpdatedBy string
|
||||
UpdatedBy int64
|
||||
|
||||
Title string
|
||||
Data map[string]interface{}
|
||||
@@ -48,8 +47,6 @@ func NewDashboard(title string) *Dashboard {
|
||||
dash.Title = title
|
||||
dash.Created = time.Now()
|
||||
dash.Updated = time.Now()
|
||||
// TODO:dash.CreatedBy = "Creator"
|
||||
// TODO:dash.UpdatedBy = "Creator"
|
||||
dash.UpdateSlug()
|
||||
return dash
|
||||
}
|
||||
@@ -81,14 +78,11 @@ func NewDashboardFromJson(data map[string]interface{}) *Dashboard {
|
||||
if dash.Data["version"] != nil {
|
||||
dash.Version = int(dash.Data["version"].(float64))
|
||||
dash.Updated = time.Now()
|
||||
// TODO:dash.UpdatedBy = "Updater"
|
||||
}
|
||||
} else {
|
||||
dash.Data["version"] = 0
|
||||
dash.Created = time.Now()
|
||||
dash.Updated = time.Now()
|
||||
// TODO:dash.CreatedBy = "Creator"
|
||||
// TODO:dash.UpdatedBy = "Creator"
|
||||
}
|
||||
|
||||
return dash
|
||||
@@ -98,6 +92,7 @@ func NewDashboardFromJson(data map[string]interface{}) *Dashboard {
|
||||
func (cmd *SaveDashboardCommand) GetDashboardModel() *Dashboard {
|
||||
dash := NewDashboardFromJson(cmd.Dashboard)
|
||||
dash.OrgId = cmd.OrgId
|
||||
dash.UpdatedBy = cmd.UpdatedBy
|
||||
dash.UpdateSlug()
|
||||
return dash
|
||||
}
|
||||
@@ -121,6 +116,7 @@ type SaveDashboardCommand struct {
|
||||
Dashboard map[string]interface{} `json:"dashboard" binding:"Required"`
|
||||
Overwrite bool `json:"overwrite"`
|
||||
OrgId int64 `json:"-"`
|
||||
UpdatedBy int64 `json:"-"`
|
||||
|
||||
Result *Dashboard
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user