1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00
This commit is contained in:
Kyle Spearrin
2017-03-03 21:53:27 -05:00
parent 29e3605576
commit 2f41f260ec
2 changed files with 15 additions and 2 deletions

View File

@ -32,7 +32,20 @@ namespace Bit.Api.Controllers
}
[HttpGet("{id}")]
public async Task<OrganizationExtendedResponseModel> Get(string id)
public async Task<OrganizationResponseModel> Get(string id)
{
var userId = _userService.GetProperUserId(User).Value;
var organization = await _organizationRepository.GetByIdAsync(new Guid(id), userId);
if(organization == null)
{
throw new NotFoundException();
}
return new OrganizationResponseModel(organization);
}
[HttpGet("{id}/extended")]
public async Task<OrganizationExtendedResponseModel> GetExtended(string id)
{
var userId = _userService.GetProperUserId(User).Value;
var organization = await _organizationRepository.GetByIdAsync(new Guid(id), userId);