mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 17:12:49 -05:00
[PM-3430] Refactor organization public key response (#3195)
This commit is contained in:
@ -682,8 +682,8 @@ public class OrganizationsController : Controller
|
||||
await _paymentService.SaveTaxInfoAsync(organization, taxInfo);
|
||||
}
|
||||
|
||||
[HttpGet("{id}/keys")]
|
||||
public async Task<OrganizationKeysResponseModel> GetKeys(string id)
|
||||
[HttpGet("{id}/public-key")]
|
||||
public async Task<OrganizationPublicKeyResponseModel> GetPublicKey(string id)
|
||||
{
|
||||
var org = await _organizationRepository.GetByIdAsync(new Guid(id));
|
||||
if (org == null)
|
||||
@ -691,7 +691,14 @@ public class OrganizationsController : Controller
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
||||
return new OrganizationKeysResponseModel(org);
|
||||
return new OrganizationPublicKeyResponseModel(org);
|
||||
}
|
||||
|
||||
[Obsolete("TDL-136 Renamed to public-key (2023.8), left for backwards compatability with older clients.")]
|
||||
[HttpGet("{id}/keys")]
|
||||
public async Task<OrganizationPublicKeyResponseModel> GetKeys(string id)
|
||||
{
|
||||
return await GetPublicKey(id);
|
||||
}
|
||||
|
||||
[HttpPost("{id}/keys")]
|
||||
|
Reference in New Issue
Block a user