Improve login failure handling.

This commit is contained in:
Yang Luo
2021-03-26 21:58:19 +08:00
parent fa358654e6
commit d11bb49eac
8 changed files with 32 additions and 29 deletions

View File

@ -164,7 +164,7 @@ func (c *ApiController) Login() {
c.ServeJSON()
return
} else {
resp = &Response{Status: "error", Msg: "need sign up"}
resp = &Response{Status: "error", Msg: fmt.Sprintf("the account for provider: %s and username: %s does not exist, please register an account first", provider.Type, userInfo.Username)}
c.Data["json"] = resp
c.ServeJSON()
return