1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

[Reset Password v1] Updated force password reset models (#1492)

This commit is contained in:
Vincent Salucci
2021-08-05 13:00:24 -05:00
committed by GitHub
parent 152f1f7a9b
commit 53a93ffcea
4 changed files with 11 additions and 7 deletions

View File

@ -799,8 +799,8 @@ namespace Bit.Api.Controllers
}
}
[HttpPost("update-temp-password")]
public async Task PostUpdateTempPasswordAsync([FromBody]UpdateTempPasswordRequestModel model)
[HttpPut("update-temp-password")]
public async Task PutUpdateTempPasswordAsync([FromBody]UpdateTempPasswordRequestModel model)
{
var user = await _userService.GetUserByPrincipalAsync(User);
if (user == null)
@ -808,7 +808,7 @@ namespace Bit.Api.Controllers
throw new UnauthorizedAccessException();
}
var result = await _userService.UpdateTempPasswordAsync(user, model.NewMasterPasswordHash, model.Key);
var result = await _userService.UpdateTempPasswordAsync(user, model.NewMasterPasswordHash, model.Key, model.MasterPasswordHint);
if (result.Succeeded)
{
return;