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

bug fixes

This commit is contained in:
Kyle Spearrin 2017-05-09 14:09:29 -04:00
parent 4447f27c81
commit a67b2b75a1
2 changed files with 5 additions and 5 deletions

View File

@ -92,7 +92,7 @@ namespace Bit.Api.Controllers
} }
var collection = model.ToCollection(orgIdGuid); 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); return new CollectionResponseModel(collection);
} }
@ -106,7 +106,7 @@ namespace Bit.Api.Controllers
throw new NotFoundException(); 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); return new CollectionResponseModel(collection);
} }

View File

@ -40,13 +40,13 @@ namespace Bit.Core.Models.Api
public class CollectionDetailsResponseModel : CollectionResponseModel public class CollectionDetailsResponseModel : CollectionResponseModel
{ {
public CollectionDetailsResponseModel(Collection collection, IEnumerable<Guid> collectionIds) public CollectionDetailsResponseModel(Collection collection, IEnumerable<Guid> groupIds)
: base(collection, "collectionDetails") : base(collection, "collectionDetails")
{ {
CollectionIds = collectionIds; GroupIds = groupIds;
} }
public IEnumerable<Guid> CollectionIds { get; set; } public IEnumerable<Guid> GroupIds { get; set; }
} }
public class CollectionUserDetailsResponseModel : CollectionResponseModel public class CollectionUserDetailsResponseModel : CollectionResponseModel