mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 17:17:36 +02:00
add m.NotFound handler
This commit is contained in:
1 parent
47493a0191
commit
bdd32f152d
2 files changed
+10
No files matched your search
@@ -20,5 +20,12 @@ func Home(ctx *middleware.Context) {
|
||||
|
||||
func Help(ctx *middleware.Context) {
|
||||
ctx.Data["PageIsHelp"] = true
|
||||
ctx.Data["Title"] = "Help"
|
||||
ctx.HTML(200, "help")
|
||||
}
|
||||
|
||||
func NotFound(ctx *middleware.Context) {
|
||||
ctx.Data["PageIsNotFound"] = true
|
||||
ctx.Data["Title"] = 404
|
||||
ctx.Handle(404, "home.NotFound", nil)
|
||||
}
|
||||
Reference in new issue
Block a user