diff options
author | zeripath <art27@cantab.net> | 2020-10-19 22:03:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-19 17:03:08 -0400 |
commit | 2f1353a2f33762e10a304cbebf3a6a8d0381d316 (patch) | |
tree | b345bf060a107341c64447f7132d9e2b8d37a7b3 /routers/routes | |
parent | 3ddf3f93d6346ac9440a7a571faea4b5c1c329be (diff) | |
download | gitea-2f1353a2f33762e10a304cbebf3a6a8d0381d316.tar.gz gitea-2f1353a2f33762e10a304cbebf3a6a8d0381d316.zip |
Move install pages out of main macaron routes (#13195)
* Move install pages out of main macaron loop
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update templates/post-install.tmpl
Co-authored-by: Lauris BH <lauris@nix.lv>
* remove prefetch
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers/routes')
-rw-r--r-- | routers/routes/routes.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 9f7ff277cf..7f43b3b2b1 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -301,6 +301,15 @@ func NewMacaron() *macaron.Macaron { return m } +// RegisterInstallRoute registers the install routes +func RegisterInstallRoute(m *macaron.Macaron) { + m.Combo("/", routers.InstallInit).Get(routers.Install). + Post(binding.BindIgnErr(auth.InstallForm{}), routers.InstallPost) + m.NotFound(func(ctx *context.Context) { + ctx.Redirect(setting.AppURL, 302) + }) +} + // RegisterRoutes routes routes to Macaron func RegisterRoutes(m *macaron.Macaron) { reqSignIn := context.Toggle(&context.ToggleOptions{SignInRequired: true}) |