1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-23 22:01:28 +01:00

fix cipher too many args for sql

This commit is contained in:
Kyle Spearrin 2017-07-11 14:43:43 -04:00
parent f0f58897a9
commit e932f3a00a

View File

@ -138,9 +138,11 @@ namespace Bit.Api.Controllers
throw new NotFoundException();
}
await _cipherService.SaveAsync(model.ToCipher(login), userId, true);
// object cannot be a descendant of CipherDetails, so let's clone it.
var cipher = Core.Utilities.CoreHelpers.CloneObject(model.ToCipher(login));
await _cipherService.SaveAsync(cipher, userId, true);
var response = new LoginResponseModel(login, _globalSettings, login.OrganizationUseTotp);
var response = new LoginResponseModel(cipher, _globalSettings, login.OrganizationUseTotp);
return response;
}