default /

This commit is contained in:
life
2014-11-12 19:08:41 +08:00
parent a6d3fe9cb8
commit cd3c2f7b12
2 changed files with 7 additions and 3 deletions

View File

@ -12,12 +12,16 @@ type Index struct {
BaseController
}
// leanote展示页, 没有登录的, 或已登录明确要进该页的
func (c Index) Index() revel.Result {
func (c Index) Default() revel.Result {
if configService.HomePageIsAdminsBlog(){
blog := Blog{c.BaseController}
return blog.Index(configService.GetAdminUsername());
}
return c.Index()
}
// leanote展示页, 没有登录的, 或已登录明确要进该页的
func (c Index) Index() revel.Result {
c.SetUserInfo()
c.RenderArgs["title"] = "leanote"
c.RenderArgs["openRegister"] = configService.GlobalStringConfigs["openRegister"]

View File

@ -5,7 +5,7 @@
module:testrunner
# Home is My Blog
Get / Index.Index
Get / Index.Default
GET /note Note.Index
# leanote home
GET /index Index.Index