Update frontend codes.

This commit is contained in:
zicla
2018-01-17 02:08:38 +08:00
parent 51cd427d7e
commit 8e576946ec
10 changed files with 22 additions and 20 deletions

View File

@ -321,6 +321,11 @@ func (this *UserController) ChangePassword(writer http.ResponseWriter, request *
user := this.checkUser(writer, request)
//如果是demo账号不提供修改密码的功能。
if user.Username == "demo" {
return this.Success(user)
}
if !MatchBcrypt(oldPassword, user.Password) {
return this.Error("旧密码不正确!")
}