1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05:00

[SM-153] Add scaffolded API integration test project (#2209)

This commit is contained in:
Oscar Hinton
2022-08-29 16:24:52 +02:00
committed by GitHub
parent 194c695cd0
commit 7c4521e0b4
10 changed files with 3382 additions and 4 deletions

View File

@ -40,7 +40,7 @@ namespace Bit.Api.Controllers
var result = new OrganizationExportResponseModel
{
Collections = GetOrganizationCollectionsResponse(orgCollections),
Ciphers = await GetOrganizationCiphersResponse(orgCiphers, collectionCiphersGroupDict)
Ciphers = GetOrganizationCiphersResponse(orgCiphers, collectionCiphersGroupDict)
};
return result;
@ -52,7 +52,7 @@ namespace Bit.Api.Controllers
return new ListResponseModel<CollectionResponseModel>(collections);
}
private async Task<ListResponseModel<CipherMiniDetailsResponseModel>> GetOrganizationCiphersResponse(IEnumerable<CipherOrganizationDetails> orgCiphers,
private ListResponseModel<CipherMiniDetailsResponseModel> GetOrganizationCiphersResponse(IEnumerable<CipherOrganizationDetails> orgCiphers,
Dictionary<Guid, IGrouping<Guid, CollectionCipher>> collectionCiphersGroupDict)
{
var responses = orgCiphers.Select(c => new CipherMiniDetailsResponseModel(c, _globalSettings,

View File

@ -40,6 +40,10 @@ namespace Bit.Api.Models.Response
providerUserOrganizationDetails?.Select(po => new ProfileProviderOrganizationResponseModel(po));
}
public ProfileResponseModel() : base("profile")
{
}
public string Id { get; set; }
public string Name { get; set; }
public string Email { get; set; }