|
|
|
@@ -158,6 +158,7 @@ func makeRepoResult(sRes *elastic.SearchResult, Key string) *SearchRes { |
|
|
|
err = json.Unmarshal(source, &recordSource) |
|
|
|
if err == nil { |
|
|
|
record := make(map[string]interface{}) |
|
|
|
record["id"] = recordSource["_id"] |
|
|
|
record["name"] = recordSource["name"] |
|
|
|
record["owner_name"] = recordSource["owner_name"] |
|
|
|
if recordSource["description"] != nil { |
|
|
|
@@ -280,6 +281,7 @@ func makeUserOrOrgResult(sRes *elastic.SearchResult, Key string, ctx *context.Co |
|
|
|
err = json.Unmarshal(source, &recordSource) |
|
|
|
if err == nil { |
|
|
|
record := make(map[string]interface{}) |
|
|
|
record["id"] = recordSource["_id"] |
|
|
|
record["name"] = recordSource["name"] |
|
|
|
record["full_name"] = recordSource["full_name"] |
|
|
|
if recordSource["description"] != nil { |
|
|
|
@@ -380,7 +382,7 @@ func makeDatasetResult(sRes *elastic.SearchResult, Key string) *SearchRes { |
|
|
|
err = json.Unmarshal(source, &recordSource) |
|
|
|
if err == nil { |
|
|
|
record := make(map[string]interface{}) |
|
|
|
record["id"] = recordSource["id"] |
|
|
|
record["id"] = recordSource["_id"] |
|
|
|
userId := recordSource["user_id"].(int64) |
|
|
|
user, errUser := models.GetUserByID(userId) |
|
|
|
if errUser == nil { |
|
|
|
@@ -462,7 +464,7 @@ func makeIssueResult(sRes *elastic.SearchResult, Key string) *SearchRes { |
|
|
|
err = json.Unmarshal(source, &recordSource) |
|
|
|
if err == nil { |
|
|
|
record := make(map[string]interface{}) |
|
|
|
record["id"] = recordSource["id"] |
|
|
|
record["id"] = recordSource["_id"] |
|
|
|
record["repo_id"] = recordSource["repo_id"] |
|
|
|
log.Info("recordSource[\"repo_id\"]=" + fmt.Sprint(recordSource["repo_id"])) |
|
|
|
repoIdstr := recordSource["repo_id"].(string) |
|
|
|
|