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

Method UpdateCate

controllers/ManagerController.go:970–978  ·  view source on GitHub ↗

更新分类字段内容

()

Source from the content-addressed store, hash-verified

968
969// 更新分类字段内容
970func (this *ManagerController) UpdateCate() {
971 field := this.GetString("field")
972 val := this.GetString("value")
973 id, _ := this.GetInt("id")
974 if err := new(models.Category).UpdateByField(id, field, val); err != nil {
975 this.JsonResult(1, "更新失败:"+err.Error())
976 }
977 this.JsonResult(0, "更新成功")
978}
979
980// 删除分类
981func (this *ManagerController) DelCate() {

Callers

nothing calls this directly

Calls 2

UpdateByFieldMethod · 0.80
JsonResultMethod · 0.80

Tested by

no test coverage detected