1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

SelectionReadOnly MERGE to CollectionGroup

This commit is contained in:
Kyle Spearrin
2017-05-11 11:41:13 -04:00
parent f0d7dc8023
commit 2b8db4d1ed
18 changed files with 129 additions and 73 deletions

View File

@ -93,7 +93,7 @@ namespace Bit.Api.Controllers
}
var group = model.ToGroup(orgIdGuid);
await _groupService.SaveAsync(group, model.CollectionIds?.Select(c => new Guid(c)));
await _groupService.SaveAsync(group, model.Collections?.Select(c => c.ToSelectionReadOnly()));
return new GroupResponseModel(group);
}
@ -107,7 +107,7 @@ namespace Bit.Api.Controllers
throw new NotFoundException();
}
await _groupService.SaveAsync(model.ToGroup(group), model.CollectionIds?.Select(c => new Guid(c)));
await _groupService.SaveAsync(model.ToGroup(group), model.Collections?.Select(c => c.ToSelectionReadOnly()));
return new GroupResponseModel(group);
}