aboutsummaryrefslogtreecommitdiff
path: root/routers/dashboard.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-03-15 22:44:29 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-03-15 22:44:29 +0800
commit2acf54b53b9be5cbd014f7af02e543a359e7f8f4 (patch)
tree1c58d89fbecd06d91bb157efac7731f059050b9d /routers/dashboard.go
parentaa8b38fe3544b77dd601997179fa51e10117613c (diff)
parentb9e57e41cee83f257caefec76a276dd143cec153 (diff)
Merge branch 'master' of github.com:gogits/gogs
Diffstat (limited to 'routers/dashboard.go')
-rw-r--r--routers/dashboard.go13
1 files changed, 4 insertions, 9 deletions
diff --git a/routers/dashboard.go b/routers/dashboard.go
index de9378b0..cab1662f 100644
--- a/routers/dashboard.go
+++ b/routers/dashboard.go
@@ -5,20 +5,15 @@
package routers
import (
- "github.com/martini-contrib/render"
- "github.com/martini-contrib/sessions"
-
- "github.com/gogits/gogs/modules/auth"
- "github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/middleware"
"github.com/gogits/gogs/routers/user"
)
-func Home(ctx *middleware.Context, r render.Render, data base.TmplData, session sessions.Session) {
- if auth.IsSignedIn(session) {
+func Home(ctx *middleware.Context) {
+ if ctx.IsSigned {
user.Dashboard(ctx)
return
}
- data["PageIsHome"] = true
- r.HTML(200, "home", data)
+ ctx.Data["PageIsHome"] = true
+ ctx.Render.HTML(200, "home", ctx.Data)
}