fix: 🐛 fix wrong api response

fix wrong api response

 Closes: #806
This commit is contained in:
GeekXu 2021-05-23 01:05:08 +08:00
parent c9a4d8285b
commit 4f6b35d38d
1 changed files with 2 additions and 0 deletions

View File

@ -102,6 +102,8 @@ func (s *ClientController) Edit() {
} else {
if c, err := file.GetDb().GetClient(id); err != nil {
s.error()
s.AjaxErr("client ID not found")
return
} else {
if s.getEscapeString("web_username") != "" {
if s.getEscapeString("web_username") == beego.AppConfig.String("web_username") || !file.GetDb().VerifyUserName(s.getEscapeString("web_username"), c.Id) {