0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-29 03:54:25 +01:00
gitea/routers/web
wxiaoguang 6b33152b7d
Decouple the different contexts from each other (#24786)
Replace #16455

Close #21803

Mixing different Gitea contexts together causes some problems:

1. Unable to respond proper content when error occurs, eg: Web should
respond HTML while API should respond JSON
2. Unclear dependency, eg: it's unclear when Context is used in
APIContext, which fields should be initialized, which methods are
necessary.


To make things clear, this PR introduces a Base context, it only
provides basic Req/Resp/Data features.

This PR mainly moves code. There are still many legacy problems and
TODOs in code, leave unrelated changes to future PRs.
2023-05-21 09:50:53 +08:00
..
admin Improve queue & process & stacktrace (#24636) 2023-05-11 07:45:47 +00:00
auth Split "modules/context.go" to separate files (#24569) 2023-05-08 17:36:54 +08:00
devtest Remove untranslatable on_date key (#24106) 2023-04-15 13:01:54 +02:00
events
explore Sort users and orgs on explore by recency by default (#24279) 2023-05-06 22:04:55 +08:00
feed Pass 'not' to commit count (#24473) 2023-05-08 07:10:53 +00:00
healthcheck
misc Decouple the different contexts from each other (#24786) 2023-05-21 09:50:53 +08:00
org Fix missing badges in org settings page (#24654) 2023-05-11 06:56:25 +00:00
repo Decouple the different contexts from each other (#24786) 2023-05-21 09:50:53 +08:00
shared Respect original content when creating secrets (#24745) 2023-05-16 14:49:40 +08:00
user Some refactors for issues stats (#24793) 2023-05-19 22:17:48 +08:00
auth_windows.go
auth.go
base.go Use standard HTTP library to serve files (#24693) 2023-05-13 16:04:57 +02:00
goget.go Support SSH for go get (#24664) 2023-05-12 09:44:37 +00:00
home.go
metrics.go
nodeinfo.go
swagger_json.go
web.go Implement actions artifacts (#22738) 2023-05-19 21:37:57 +08:00
webfinger.go