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

Method UpdateAds

controllers/ManagerController.go:843–856  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

841}
842
843func (this *ManagerController) UpdateAds() {
844 id, _ := this.GetInt("id")
845 field := this.GetString("field")
846 value := this.GetString("value")
847 if field == "" {
848 this.JsonResult(1, "字段不能为空")
849 }
850 _, err := orm.NewOrm().QueryTable(models.NewAdsCont()).Filter("id", id).Update(orm.Params{field: value})
851 if err != nil {
852 this.JsonResult(1, err.Error())
853 }
854 go models.UpdateAdsCache()
855 this.JsonResult(0, "操作成功")
856}
857
858func (this *ManagerController) DelAds() {
859 id, _ := this.GetInt("id")

Callers

nothing calls this directly

Calls 4

NewAdsContFunction · 0.92
UpdateAdsCacheFunction · 0.92
JsonResultMethod · 0.80
UpdateMethod · 0.45

Tested by

no test coverage detected