Przeglądaj źródła

更新 'controllers/BlogController.go'

master
rodzic
commit
2bc6ebd112
  1. 3
      controllers/BlogController.go

3
controllers/BlogController.go

@ -47,10 +47,11 @@ func (this *BlogController) Save() {
title := this.GetString("title")
blogHtml := this.GetString("blogHtml")
blogDesc := this.GetString("blogDesc")
blogValue := this.GetString("blogValue")
catory := this.GetString("catory")
catoryId, _ := strconv.ParseInt(catory, 10, 64)
labels := this.GetStrings("labels[]")
blog := &models.Blog{Title: title, BlogHtml: blogHtml, CategoryId: catoryId, UserId: uid.(int64), BlogDesc: blogDesc}
blog := &models.Blog{Title: title, BlogHtml: blogHtml, BlogValue: blogValue,CategoryId: catoryId, UserId: uid.(int64), BlogDesc: blogDesc}
err := blogService.SaveBlog(blog, labels)
if err == nil {
this.Data["json"] = models.ReurnData("", blog.Id)

Ładowanie…
Anuluj
Zapisz