feat: return the correct error message in the Edit Model (#1504)

This commit is contained in:
wht
2023-01-30 22:19:42 +08:00
committed by GitHub
parent 75b8357de8
commit 24a824d394
2 changed files with 12 additions and 6 deletions

View File

@ -80,7 +80,7 @@ func (c *ApiController) UpdateModel() {
return
}
c.Data["json"] = wrapActionResponse(object.UpdateModel(id, &model))
c.Data["json"] = wrapErrorResponse(object.UpdateModelWithCheck(id, &model))
c.ServeJSON()
}