fix: improve error messages

This commit is contained in:
Gucheng Wang
2022-03-07 15:15:59 +08:00
parent 8a9cc2eb8f
commit 3602d9b9a7
4 changed files with 9 additions and 9 deletions

View File

@ -190,7 +190,7 @@ func (c *ApiController) GetEmailAndPhone() {
user := object.GetUserByFields(form.Organization, form.Username)
if user == nil {
c.ResponseError("No such user.")
c.ResponseError(fmt.Sprintf("The user: %s/%s doesn't exist", form.Organization, form.Username))
return
}
@ -226,7 +226,7 @@ func (c *ApiController) SetPassword() {
requestUserId := c.GetSessionUsername()
if requestUserId == "" {
c.ResponseError("Please login first.")
c.ResponseError("Please login first")
return
}