示例#1
0
//------------------------
// 博客设置
func (this *BlogService) GetUserBlog(userId string) info.UserBlog {
	userBlog := info.UserBlog{}
	db.Get(db.UserBlogs, userId, &userBlog)

	if userBlog.Title == "" {
		userInfo := userService.GetUserInfo(userId)
		userBlog.Title = userInfo.Username + " 的博客"
	}

	return userBlog
}