MCPcopy Index your code
hub / github.com/TruthHun/BookStack / Clear

Method Clear

models/document_history.go:59–66  ·  view source on GitHub ↗

清空指定文档的历史.

(docId int)

Source from the content-addressed store, hash-verified

57
58//清空指定文档的历史.
59func (m *DocumentHistory) Clear(docId int) error {
60 o := orm.NewOrm()
61 _, err := o.Raw("DELETE from md_document_history WHERE document_id = ?", docId).Exec()
62 if err == nil {
63 m.DeleteByDocumentId(docId)
64 }
65 return err
66}
67
68//删除历史.
69func (m *DocumentHistory) Delete(historyId, docId int) error {

Callers

nothing calls this directly

Calls 1

DeleteByDocumentIdMethod · 0.95

Tested by

no test coverage detected