Merge pull request #807 from geek981108/fix

fix: 🐛 fix wrong api response
This commit is contained in:
he liu 2021-10-07 23:00:41 +08:00 committed by GitHub
commit 968d03d58b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {