for setBlog

This commit is contained in:
life
2014-11-09 22:26:38 +08:00
parent 8ef91b7418
commit 954c4e5e95
2 changed files with 32 additions and 4 deletions

View File

@ -68,4 +68,12 @@ func (c Notebook) DragNotebooks(data string) revel.Result {
json.Unmarshal([]byte(data), &info)
return c.RenderJson(notebookService.DragNotebooks(c.GetUserId(), info.CurNotebookId, info.ParentNotebookId, info.Siblings))
}
// 设置notebook <-> blog
func (c Notebook) SetNotebook2Blog(notebookId string, isBlog bool) revel.Result {
noteUpdate := bson.M{"IsBlog": isBlog}
re := notebookService.UpdateNotebook(c.GetUserId(),
notebookId, noteUpdate)
return c.RenderJson(re)
}