Browse Source

fix cipher too many args for sql

pull/95/head
Kyle Spearrin 9 years ago
parent
commit
e932f3a00a
  1. 6
      src/Api/Controllers/LoginsController.cs

6
src/Api/Controllers/LoginsController.cs

@ -138,9 +138,11 @@ namespace Bit.Api.Controllers @@ -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;
}

Loading…
Cancel
Save