Exemplo n.º 1
0
        public async Task MoveMany([FromBody] CipherBulkMoveRequestModel model)
        {
            if (!_globalSettings.SelfHosted && model.Ids.Count() > 500)
            {
                throw new BadRequestException("You can only move up to 500 items at a time.");
            }

            var userId = _userService.GetProperUserId(User).Value;
            await _cipherService.MoveManyAsync(model.Ids.Select(i => new Guid(i)),
                                               string.IsNullOrWhiteSpace(model.FolderId)?(Guid?)null : new Guid(model.FolderId), userId);
        }
Exemplo n.º 2
0
 public async Task MoveMany([FromBody] CipherBulkMoveRequestModel model)
 {
     var userId = _userService.GetProperUserId(User).Value;
     await _cipherService.MoveManyAsync(model.Ids.Select(i => new Guid(i)),
                                        string.IsNullOrWhiteSpace(model.FolderId)?(Guid?)null : new Guid(model.FolderId), userId);
 }