笔记信息, 历史记录, 提示, 附件优化

https://github.com/leanote/leanote/issues/224
This commit is contained in:
lealife
2015-10-10 16:10:54 +08:00
parent 274875c6c4
commit 320263eefa
58 changed files with 2078 additions and 5398 deletions

@ -84,6 +84,13 @@ func (c BaseController) GetUserInfo() info.User {
return info.User{}
}
func (c BaseController) GetUserAndBlogUrl() info.UserAndBlogUrl {
if userId, ok := c.Session["UserId"]; ok && userId != "" {
return userService.GetUserAndBlogUrl(userId);
}
return info.UserAndBlogUrl{}
}
// 这里的session都是cookie中的, 与数据库session无关
func (c BaseController) GetSession(key string) string {
v, ok := c.Session[key]