Browse Source

Merge pull request 'reformat import' (#98) from optimization-repo-list into develop

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/98
Reviewed-by: lewis <747342561@qq.com>
tags/v1.21.12.1
lewis 4 years ago
parent
commit
f3a9a73a22
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      routers/api/v1/repo/repo.go

+ 5
- 4
routers/api/v1/repo/repo.go View File

@@ -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


Loading…
Cancel
Save