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

Method SetBookmarks

controllers/api/LoginedController.go:69–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67}
68
69func (this *LoginedController) SetBookmarks() {
70 docId, _ := this.GetInt("doc_id")
71 if docId <= 0 {
72 this.Response(http.StatusBadRequest, messageBadRequest)
73 }
74 bm := models.NewBookmark()
75 if !bm.Exist(this.isLogin(), docId) {
76 bm.InsertOrDelete(this.isLogin(), docId)
77 }
78 this.Response(http.StatusOK, messageSuccess)
79}
80
81func (this *LoginedController) DeleteBookmarks() {
82 docId, _ := this.GetInt("doc_id")

Callers

nothing calls this directly

Calls 5

ExistMethod · 0.95
InsertOrDeleteMethod · 0.95
NewBookmarkFunction · 0.92
ResponseMethod · 0.80
isLoginMethod · 0.80

Tested by

no test coverage detected