aboutsummaryrefslogtreecommitdiffstats
path: root/routers/dashboard.go
diff options
context:
space:
mode:
authorFuXiaoHei <fuxiaohei@hexiaz.com>2014-03-23 13:48:01 +0800
committerFuXiaoHei <fuxiaohei@hexiaz.com>2014-03-23 13:48:01 +0800
commitbdd32f152d73f31beffa854fb7382072043ef235 (patch)
tree47b834dab6b6dfda465ca12849a09ca521a0014b /routers/dashboard.go
parent47493a0191f3de8aa4e80bce1911f14623cfa46a (diff)
downloadgitea-bdd32f152d73f31beffa854fb7382072043ef235.tar.gz
gitea-bdd32f152d73f31beffa854fb7382072043ef235.zip
add m.NotFound handler
Diffstat (limited to 'routers/dashboard.go')
-rw-r--r--routers/dashboard.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/routers/dashboard.go b/routers/dashboard.go
index f61d67b7de..dafe9f31ec 100644
--- a/routers/dashboard.go
+++ b/routers/dashboard.go
@@ -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)
+}