-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
ff56292
commit cb700ae
Showing
18 changed files
with
747 additions
and
676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2023 The Gitea Authors. All rights reserved. | ||
// SPDX-License-Identifier: MIT | ||
|
||
package repo | ||
|
||
import "code.gitea.io/gitea/models/db" | ||
|
||
// SearchOrderByMap represents all possible search order | ||
var SearchOrderByMap = map[string]map[string]db.SearchOrderBy{ | ||
"asc": { | ||
"alpha": db.SearchOrderByAlphabetically, | ||
"created": db.SearchOrderByOldest, | ||
"updated": db.SearchOrderByLeastUpdated, | ||
"size": db.SearchOrderBySize, | ||
"id": db.SearchOrderByID, | ||
}, | ||
"desc": { | ||
"alpha": db.SearchOrderByAlphabeticallyReverse, | ||
"created": db.SearchOrderByNewest, | ||
"updated": db.SearchOrderByRecentUpdated, | ||
"size": db.SearchOrderBySizeReverse, | ||
"id": db.SearchOrderByIDReverse, | ||
}, | ||
} |
Oops, something went wrong.