mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-27 04:07:08 +00:00
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>
This commit is contained in:
parent
3ddf3f93d6
commit
2f1353a2f3
10 changed files with 234 additions and 115 deletions
|
@ -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})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue