Refine all the panic method.

This commit is contained in:
zicla
2019-04-26 02:50:32 +08:00
parent 8edc30babc
commit 46256439da
13 changed files with 98 additions and 100 deletions

View File

@ -85,10 +85,10 @@ func (this *DavController) CheckCurrentUser(writer http.ResponseWriter, request
user := this.userDao.FindByUsername(username)
if user == nil {
this.PanicBadRequest("邮箱或密码错误")
panic(result.BadRequest("邮箱或密码错误"))
} else {
if !tool.MatchBcrypt(password, user.Password) {
this.PanicBadRequest("邮箱或密码错误")
panic(result.BadRequest("邮箱或密码错误"))
}
}