mirror of
https://github.com/bitwarden/server
synced 2025-12-12 14:23:38 +00:00
return ProfileOrganizationResponseModel for /organizations (#1016)
This commit is contained in:
@@ -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("")]
|
||||
|
||||
Reference in New Issue
Block a user