diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-05-08 17:36:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-08 17:36:54 +0800 |
commit | cb700aedd1e670fb47b8cf0cd67fb117a1ad88a2 (patch) | |
tree | 90cdc8e732b1c498bf5113accad8dc4245a059ac /routers/api/v1 | |
parent | ff5629268c5c01d3f460570baa571baef3f896cd (diff) | |
download | gitea-cb700aedd1e670fb47b8cf0cd67fb117a1ad88a2.tar.gz gitea-cb700aedd1e670fb47b8cf0cd67fb117a1ad88a2.zip |
Split "modules/context.go" to separate files (#24569)
The "modules/context.go" is too large to maintain.
This PR splits it to separate files, eg: context_request.go,
context_response.go, context_serve.go
This PR will help:
1. The future refactoring for Gitea's web context (eg: simplify the context)
2. Introduce proper "range request" support
3. Introduce context function
This PR only moves code, doesn't change any logic.
Diffstat (limited to 'routers/api/v1')
-rw-r--r-- | routers/api/v1/repo/repo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 36cc03f893..480ca397d4 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -178,7 +178,7 @@ func Search(ctx *context.APIContext) { if len(sortOrder) == 0 { sortOrder = "asc" } - if searchModeMap, ok := context.SearchOrderByMap[sortOrder]; ok { + if searchModeMap, ok := repo_model.SearchOrderByMap[sortOrder]; ok { if orderBy, ok := searchModeMap[sortMode]; ok { opts.OrderBy = orderBy } else { |