From a67b2b75a1f5362930491ab566e87ac141e93e2a Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 9 May 2017 14:09:29 -0400 Subject: [PATCH] bug fixes --- src/Api/Controllers/CollectionsController.cs | 4 ++-- src/Core/Models/Api/Response/CollectionResponseModel.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Api/Controllers/CollectionsController.cs b/src/Api/Controllers/CollectionsController.cs index 1bc8a60ab2..dab97618be 100644 --- a/src/Api/Controllers/CollectionsController.cs +++ b/src/Api/Controllers/CollectionsController.cs @@ -92,7 +92,7 @@ namespace Bit.Api.Controllers } var collection = model.ToCollection(orgIdGuid); - await _collectionService.SaveAsync(collection, model?.GroupIds.Select(g => new Guid(g))); + await _collectionService.SaveAsync(collection, model.GroupIds?.Select(g => new Guid(g))); return new CollectionResponseModel(collection); } @@ -106,7 +106,7 @@ namespace Bit.Api.Controllers throw new NotFoundException(); } - await _collectionService.SaveAsync(model.ToCollection(collection), model?.GroupIds.Select(g => new Guid(g))); + await _collectionService.SaveAsync(model.ToCollection(collection), model.GroupIds?.Select(g => new Guid(g))); return new CollectionResponseModel(collection); } diff --git a/src/Core/Models/Api/Response/CollectionResponseModel.cs b/src/Core/Models/Api/Response/CollectionResponseModel.cs index d1685a09ea..e42d5d07af 100644 --- a/src/Core/Models/Api/Response/CollectionResponseModel.cs +++ b/src/Core/Models/Api/Response/CollectionResponseModel.cs @@ -40,13 +40,13 @@ namespace Bit.Core.Models.Api public class CollectionDetailsResponseModel : CollectionResponseModel { - public CollectionDetailsResponseModel(Collection collection, IEnumerable collectionIds) + public CollectionDetailsResponseModel(Collection collection, IEnumerable groupIds) : base(collection, "collectionDetails") { - CollectionIds = collectionIds; + GroupIds = groupIds; } - public IEnumerable CollectionIds { get; set; } + public IEnumerable GroupIds { get; set; } } public class CollectionUserDetailsResponseModel : CollectionResponseModel