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

Update APIs to collect other set password info (#870)

This commit is contained in:
Kyle Spearrin
2020-08-17 10:40:35 -04:00
committed by GitHub
parent af85e17486
commit d190c4bd0f
3 changed files with 26 additions and 6 deletions

View File

@ -197,7 +197,7 @@ namespace Bit.Api.Controllers
}
[HttpPost("set-password")]
public async Task SetPasswordAsync([FromBody]SetPasswordRequestModel model)
public async Task PostSetPasswordAsync([FromBody]SetPasswordRequestModel model)
{
var user = await _userService.GetUserByPrincipalAsync(User);
if (user == null)
@ -205,7 +205,7 @@ namespace Bit.Api.Controllers
throw new UnauthorizedAccessException();
}
var result = await _userService.SetPasswordAsync(user, model.NewMasterPasswordHash, model.Key);
var result = await _userService.SetPasswordAsync(model.ToUser(user), model.MasterPasswordHash, model.Key);
if (result.Succeeded)
{
return;