mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 00:52:49 -05:00
[AC-1923] Add endpoint to create client organization (#3977)
* Add new endpoint for creating client organizations in consolidated billing * Create empty org and then assign seats for code re-use * Fixes made from debugging client side * few more small fixes * Vincent's feedback
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
using Bit.Api.Billing.Models;
|
||||
using Bit.Api.Billing.Models.Responses;
|
||||
using Bit.Core;
|
||||
using Bit.Core.Billing.Queries;
|
||||
using Bit.Core.Context;
|
||||
@ -28,17 +28,17 @@ public class ProviderBillingController(
|
||||
return TypedResults.Unauthorized();
|
||||
}
|
||||
|
||||
var subscriptionData = await providerBillingQueries.GetSubscriptionData(providerId);
|
||||
var providerSubscriptionDTO = await providerBillingQueries.GetSubscriptionDTO(providerId);
|
||||
|
||||
if (subscriptionData == null)
|
||||
if (providerSubscriptionDTO == null)
|
||||
{
|
||||
return TypedResults.NotFound();
|
||||
}
|
||||
|
||||
var (providerPlans, subscription) = subscriptionData;
|
||||
var (providerPlans, subscription) = providerSubscriptionDTO;
|
||||
|
||||
var providerSubscriptionDTO = ProviderSubscriptionDTO.From(providerPlans, subscription);
|
||||
var providerSubscriptionResponse = ProviderSubscriptionResponse.From(providerPlans, subscription);
|
||||
|
||||
return TypedResults.Ok(providerSubscriptionDTO);
|
||||
return TypedResults.Ok(providerSubscriptionResponse);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user