|
@ -54,8 +54,6 @@ func (this *BlogController) Save() { |
|
|
err := blogService.SaveBlog(blog, labels) |
|
|
err := blogService.SaveBlog(blog, labels) |
|
|
if err == nil { |
|
|
if err == nil { |
|
|
this.Data["json"] = models.ReurnData("", blog.Id) |
|
|
this.Data["json"] = models.ReurnData("", blog.Id) |
|
|
blog.User.Salt = "" |
|
|
|
|
|
blog.User.UserPwd = "" |
|
|
|
|
|
utils.ESSave(blog) |
|
|
utils.ESSave(blog) |
|
|
} else { |
|
|
} else { |
|
|
this.Data["json"] = models.ReurnError(500, "保存失败") |
|
|
this.Data["json"] = models.ReurnError(500, "保存失败") |
|
@ -242,7 +240,7 @@ func (this *BlogController) SyncBlog() { |
|
|
list, err := blogService.AllBlogs() |
|
|
list, err := blogService.AllBlogs() |
|
|
var i = 0 |
|
|
var i = 0 |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
this.Data["json"] = models.ReurnError(500,""); |
|
|
this.Data["json"] = models.ReurnError(500, "") |
|
|
this.ServeJSON() |
|
|
this.ServeJSON() |
|
|
} |
|
|
} |
|
|
for index := range list { |
|
|
for index := range list { |
|
|