fork render

This commit is contained in:
slene committed 2014-03-19 22:21:03 +08:00
1 parent 483cc31369
commit 199fdd0336
14 files changed
+1349 -83

No files matched your search

+2 -2
View File
@@ -13,7 +13,7 @@ func SignInRequire(redirect bool) martini.Handler {
return func(ctx *Context) {
if !ctx.IsSigned {
if redirect {
ctx.Render.Redirect("/")
ctx.Redirect("/")
}
return
} else if !ctx.User.IsActive {
@@ -28,7 +28,7 @@ func SignInRequire(redirect bool) martini.Handler {
func SignOutRequire() martini.Handler {
return func(ctx *Context) {
if ctx.IsSigned {
ctx.Render.Redirect("/")
ctx.Redirect("/")
}
}
}