1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-22 21:51:22 +01:00

return ProfileOrganizationResponseModel for /organizations (#1016)

This commit is contained in:
Kyle Spearrin 2020-12-01 16:43:07 -05:00 committed by GitHub
parent c0defd8971
commit c0781db333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,12 +136,12 @@ namespace Bit.Api.Controllers
}
[HttpGet("")]
public async Task<ListResponseModel<OrganizationResponseModel>> GetUser()
public async Task<ListResponseModel<ProfileOrganizationResponseModel>> GetUser()
{
var userId = _userService.GetProperUserId(User).Value;
var organizations = await _organizationRepository.GetManyByUserIdAsync(userId);
var responses = organizations.Select(o => new OrganizationResponseModel(o));
return new ListResponseModel<OrganizationResponseModel>(responses);
var organizations = await _organizationUserRepository.GetManyDetailsByUserAsync(userId);
var responses = organizations.Select(o => new ProfileOrganizationResponseModel(o));
return new ListResponseModel<ProfileOrganizationResponseModel>(responses);
}
[HttpPost("")]