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

Method UpdateBookSort

controllers/ManagerController.go:910–921  ·  view source on GitHub ↗

更行书籍书籍的排序

()

Source from the content-addressed store, hash-verified

908
909// 更行书籍书籍的排序
910func (this *ManagerController) UpdateBookSort() {
911 bookId, _ := this.GetInt("book_id")
912 orderIndex, _ := this.GetInt("value")
913 if bookId > 0 {
914 if _, err := orm.NewOrm().QueryTable("md_books").Filter("book_id", bookId).Update(orm.Params{
915 "order_index": orderIndex,
916 }); err != nil {
917 this.JsonResult(1, err.Error())
918 }
919 }
920 this.JsonResult(0, "排序更新成功")
921}
922
923func (this *ManagerController) Sitemap() {
924 baseUrl := this.Ctx.Input.Scheme() + "://" + this.Ctx.Request.Host

Callers

nothing calls this directly

Calls 2

JsonResultMethod · 0.80
UpdateMethod · 0.45

Tested by

no test coverage detected