Fixed angularjs variable names

This commit is contained in:
utkarshcmu
2016-01-19 23:23:44 -08:00
parent 281ec60085
commit aa1d28835d
4 changed files with 41 additions and 7 deletions
+19 -1
View File
@@ -118,5 +118,23 @@ func SearchDashboardSnapshots(c *middleware.Context) Response {
return ApiError(500, "Search failed", err)
}
return Json(200, searchQuery.Result)
dtos := make([]*m.DashboardSnapshotDTO, len(searchQuery.Result))
for i, snapshot := range searchQuery.Result {
dtos[i] = &m.DashboardSnapshotDTO{
Id: snapshot.Id,
Name: snapshot.Name,
Key: snapshot.Key,
DeleteKey: snapshot.DeleteKey,
OrgId: snapshot.OrgId,
UserId: snapshot.UserId,
External: snapshot.External,
ExternalUrl: snapshot.ExternalUrl,
Expires: snapshot.Expires,
Created: snapshot.Created,
Updated: snapshot.Updated,
}
}
return Json(200, dtos)
//return Json(200, searchQuery.Result)
}