MCPcopy Create free account
hub / github.com/TruthHun/BookStack / Clear

Method Clear

controllers/RecordController.go:60–70  ·  view source on GitHub ↗

重置阅读进度(清空阅读历史)

()

Source from the content-addressed store, hash-verified

58
59//重置阅读进度(清空阅读历史)
60func (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//删除单条阅读历史
73func (this *RecordController) Delete() {

Callers

nothing calls this directly

Calls 1

JsonResultMethod · 0.80

Tested by

no test coverage detected