Example #1
0
        public async Task PostMove(string id, [FromBody] CipherMoveRequestModel model)
        {
            var userId = _userService.GetProperUserId(User).Value;
            var cipher = await _cipherRepository.GetByIdAsync(new Guid(id), userId);

            if (cipher == null)
            {
                throw new NotFoundException();
            }

            await _cipherService.MoveSubvaultAsync(model.Cipher.ToCipher(cipher),
                                                   model.SubvaultIds.Select(s => new Guid(s)), userId);
        }