db connection lost #222

This commit is contained in:
lealife
2015-10-10 14:49:02 +08:00
parent 0479f1a433
commit 70ee362cc8
2 changed files with 22 additions and 1 deletions

View File

@ -2,7 +2,7 @@ package route
import (
"github.com/revel/revel"
// "github.com/leanote/leanote/app/service"
"github.com/leanote/leanote/app/db"
// . "github.com/leanote/leanote/app/lea"
"net/url"
"strings"
@ -42,6 +42,10 @@ func RouterFilter(c *revel.Controller, fc []revel.Filter) {
}
*/
if route.ControllerName != "Static" {
// 检查mongodb 是否lost
db.CheckMongoSessionLost()
// api设置
// leanote.com/api/user/get => ApiUser::Get
//* /api/login ApiAuth.Login, 这里的设置, 其实已经转成了ApiAuth了