重置阅读进度(清空阅读历史)
()
| 58 | |
| 59 | //重置阅读进度(清空阅读历史) |
| 60 | func (this *RecordController) Clear() { |
| 61 | bookId, _ := this.GetInt(":book_id") |
| 62 | if bookId > 0 { |
| 63 | m := new(models.ReadRecord) |
| 64 | if err := m.Clear(this.Member.MemberId, bookId); err != nil { |
| 65 | beego.Error(err) |
| 66 | } |
| 67 | } |
| 68 | //不管删除是否成功,均返回成功 |
| 69 | this.JsonResult(0, "重置阅读进度成功") |
| 70 | } |
| 71 | |
| 72 | //删除单条阅读历史 |
| 73 | func (this *RecordController) Delete() { |
nothing calls this directly
no test coverage detected