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

Method UpdateBanner

controllers/ManagerController.go:1090–1101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1088}
1089
1090func (this *ManagerController) UpdateBanner() {
1091 id, _ := this.GetInt("id")
1092 field := this.GetString("field")
1093 value := this.GetString("value")
1094 if id > 0 {
1095 err := models.NewBanner().Update(id, field, value)
1096 if err != nil {
1097 this.JsonResult(1, err.Error())
1098 }
1099 }
1100 this.JsonResult(0, "更新成功")
1101}
1102
1103func (this *ManagerController) UploadBanner() {
1104 f, h, err := this.GetFile("image")

Callers

nothing calls this directly

Calls 3

NewBannerFunction · 0.92
JsonResultMethod · 0.80
UpdateMethod · 0.45

Tested by

no test coverage detected