MCPcopy Index your code
hub / github.com/TruthHun/DocHub / Update

Method Update

controllers/AdminControllers/BaseController.go:112–125  ·  view source on GitHub ↗

更新内容

()

Source from the content-addressed store, hash-verified

110
111//更新内容
112func (this *BaseController) Update() {
113 id := strings.Split(this.GetString("id"), ",")
114 i, err := models.UpdateByIds(this.GetString("table"), this.GetString("field"), this.GetString("value"), id)
115 ret := map[string]interface{}{"status": 0, "msg": "更新失败,可能您未对内容作更改"}
116 if i > 0 && err == nil {
117 ret["status"] = 1
118 ret["msg"] = "更新成功"
119 }
120 if err != nil {
121 ret["msg"] = err.Error()
122 }
123 this.Data["json"] = ret
124 this.ServeJSON()
125}
126
127//删除内容
128func (this *BaseController) Del() {

Callers 15

CreateCollectFolderMethod · 0.80
DocEditMethod · 0.80
AvatarMethod · 0.80
EditMethod · 0.80
PagesMethod · 0.80
UpdatePwdMethod · 0.80
UpdateAdminMethod · 0.80
EditMethod · 0.80
GetMethod · 0.80
CanDownloadFileMethod · 0.80
InsertMethod · 0.80
installCategoryFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected