收藏书籍(将书籍加入书架)/移除书籍
()
| 52 | |
| 53 | // 收藏书籍(将书籍加入书架)/移除书籍 |
| 54 | func (this *LoginedController) Star() { |
| 55 | bookId := this.getBookIdByIdentify(this.GetString("identify")) |
| 56 | if bookId <= 0 { |
| 57 | this.Response(http.StatusBadRequest, messageBadRequest) |
| 58 | } |
| 59 | |
| 60 | cancel, err := new(models.Star).Star(this.isLogin(), bookId) |
| 61 | data := map[string]bool{"is_cancel": cancel} |
| 62 | if err != nil { |
| 63 | beego.Error(err.Error()) |
| 64 | } |
| 65 | |
| 66 | this.Response(http.StatusOK, messageSuccess, map[string]interface{}{"data": data}) |
| 67 | } |
| 68 | |
| 69 | func (this *LoginedController) SetBookmarks() { |
| 70 | docId, _ := this.GetInt("doc_id") |
nothing calls this directly
no test coverage detected