漏提交
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user