漏提交

This commit is contained in:
2022-04-06 15:32:05 +08:00
parent 512a4591af
commit 59f5dc4944
2 changed files with 23 additions and 2 deletions
@@ -161,8 +161,16 @@ namespace IRaCIS.Application.Services
/// <returns></returns>
[HttpGet("{userId:guid}")]
public async Task<IResponseOutput> ResetPassword(Guid userId
public async Task<IResponseOutput> ResetPassword(Guid userId)
{
var success = await _userRepository.UpdateFromQueryAsync(t => t.Id == userId, u => new User()
{
Password = MD5Helper.Md5(StaticData.DefaultPassword),
PasswordChanged = false
});
return ResponseOutput.Result(success);
}
@@ -247,7 +255,12 @@ namespace IRaCIS.Application.Services
}
/// <summary>
/// (未登陆) 设置新密码
/// </summary>
/// <param name="userId"></param>
/// <param name="newPwd"></param>
/// <returns></returns>
[AllowAnonymous]
[HttpGet("{userId:guid}/{newPwd}")]
public async Task<IResponseOutput> AnonymousSetPassword(Guid userId, string newPwd)