mirror of
https://github.com/bitwarden/server
synced 2025-12-29 22:54:00 +00:00
[PM-25182] Improve Swagger OperationIDs for Billing (#6238)
* Improve Swagger OperationIDs for Billing * Fix typo
This commit is contained in:
@@ -53,7 +53,7 @@ public class SelfHostedOrganizationLicensesController : Controller
|
||||
}
|
||||
|
||||
[HttpPost("")]
|
||||
public async Task<OrganizationResponseModel> PostLicenseAsync(OrganizationCreateLicenseRequestModel model)
|
||||
public async Task<OrganizationResponseModel> CreateLicenseAsync(OrganizationCreateLicenseRequestModel model)
|
||||
{
|
||||
var user = await _userService.GetUserByPrincipalAsync(User);
|
||||
if (user == null)
|
||||
@@ -74,7 +74,7 @@ public class SelfHostedOrganizationLicensesController : Controller
|
||||
}
|
||||
|
||||
[HttpPost("{id}")]
|
||||
public async Task PostLicenseAsync(string id, LicenseRequestModel model)
|
||||
public async Task UpdateLicenseAsync(string id, LicenseRequestModel model)
|
||||
{
|
||||
var orgIdGuid = new Guid(id);
|
||||
if (!await _currentContext.OrganizationOwner(orgIdGuid))
|
||||
|
||||
@@ -79,7 +79,6 @@ public class SelfHostedOrganizationSponsorshipsController : Controller
|
||||
}
|
||||
|
||||
[HttpDelete("{sponsoringOrgId}")]
|
||||
[HttpPost("{sponsoringOrgId}/delete")]
|
||||
public async Task RevokeSponsorship(Guid sponsoringOrgId)
|
||||
{
|
||||
var orgUser = await _organizationUserRepository.GetByOrganizationAsync(sponsoringOrgId, _currentContext.UserId ?? default);
|
||||
@@ -95,6 +94,13 @@ public class SelfHostedOrganizationSponsorshipsController : Controller
|
||||
await _revokeSponsorshipCommand.RevokeSponsorshipAsync(existingOrgSponsorship);
|
||||
}
|
||||
|
||||
[HttpPost("{sponsoringOrgId}/delete")]
|
||||
[Obsolete("This endpoint is deprecated. Use DELETE /{sponsoringOrgId} instead.")]
|
||||
public async Task PostRevokeSponsorship(Guid sponsoringOrgId)
|
||||
{
|
||||
await RevokeSponsorship(sponsoringOrgId);
|
||||
}
|
||||
|
||||
[HttpDelete("{sponsoringOrgId}/{sponsoredFriendlyName}/revoke")]
|
||||
public async Task AdminInitiatedRevokeSponsorshipAsync(Guid sponsoringOrgId, string sponsoredFriendlyName)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user