|
|
|
@@ -6,6 +6,10 @@ |
|
|
|
package repo |
|
|
|
|
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
"net/http" |
|
|
|
"strings" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/models" |
|
|
|
"code.gitea.io/gitea/modules/context" |
|
|
|
"code.gitea.io/gitea/modules/git" |
|
|
|
@@ -17,9 +21,6 @@ import ( |
|
|
|
"code.gitea.io/gitea/modules/validation" |
|
|
|
"code.gitea.io/gitea/routers/api/v1/utils" |
|
|
|
repo_service "code.gitea.io/gitea/services/repository" |
|
|
|
"fmt" |
|
|
|
"net/http" |
|
|
|
"strings" |
|
|
|
) |
|
|
|
|
|
|
|
var searchOrderByMap = map[string]map[string]models.SearchOrderBy{ |
|
|
|
@@ -216,7 +217,7 @@ func Search(ctx *context.APIContext) { |
|
|
|
}) |
|
|
|
} |
|
|
|
results[i] = repo.APIFormat(accessMode) |
|
|
|
results[i].TimeSinceUnixUpdatedHtml = timeutil.TimeSinceUnix(repo.UpdatedUnix,ctx.Language()) |
|
|
|
results[i].TimeSinceUnixUpdatedHtml = timeutil.TimeSinceUnix(repo.UpdatedUnix, ctx.Language()) |
|
|
|
if repo.PrimaryLanguage != nil { |
|
|
|
results[i].PrimaryLanguage = repo.PrimaryLanguage.Language |
|
|
|
results[i].PrimaryLanguageColor = repo.PrimaryLanguage.Color |
|
|
|
|