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

Method UpdateVersion

controllers/ManagerController.go:1209–1220  ·  view source on GitHub ↗

Versions 版本管理

()

Source from the content-addressed store, hash-verified

1207
1208// Versions 版本管理
1209func (this *ManagerController) UpdateVersion() {
1210 id, _ := this.GetInt("id")
1211 field := this.GetString("field")
1212 value := this.GetString("value")
1213 if id > 0 {
1214 _, err := orm.NewOrm().QueryTable(models.NewVersion()).Filter("id", id).Update(orm.Params{field: value})
1215 if err != nil {
1216 this.JsonResult(1, err.Error())
1217 }
1218 }
1219 this.JsonResult(0, "更新成功")
1220}
1221
1222// AddVersions 添加版本
1223func (this *ManagerController) AddVersions() {

Callers

nothing calls this directly

Calls 3

NewVersionFunction · 0.92
JsonResultMethod · 0.80
UpdateMethod · 0.45

Tested by

no test coverage detected