Browse Source

bug修复

layui
yasaka 5 years ago
parent
commit
dfe8e7ce91
  1. 4
      controllers/BlogController.go

4
controllers/BlogController.go

@ -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 {

Loading…
Cancel
Save