mirror of
https://github.com/bitwarden/server.git
synced 2025-07-06 10:32:49 -05:00
[PM-8445] Update trial initiation UI (#4712)
* Add the feature flag Signed-off-by: Cy Okeke <cokeke@bitwarden.com> * Initial comment Signed-off-by: Cy Okeke <cokeke@bitwarden.com> * changes to subscribe with payment method Signed-off-by: Cy Okeke <cokeke@bitwarden.com> * Add new objects * Implementation for subscription without payment method Signed-off-by: Cy Okeke <cokeke@bitwarden.com> * Remove unused codes and classes Signed-off-by: Cy Okeke <cokeke@bitwarden.com> * Rename the flag properly Signed-off-by: Cy Okeke <cokeke@bitwarden.com> * remove implementation that is no longer needed Signed-off-by: Cy Okeke <cokeke@bitwarden.com> * revert the changes on some code removal Signed-off-by: Cy Okeke <cokeke@bitwarden.com> * Resolve the pr comment Signed-off-by: Cy Okeke <cokeke@bitwarden.com> * format the data annotations line breaks Signed-off-by: Cy Okeke <cokeke@bitwarden.com> --------- Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
This commit is contained in:
@ -171,6 +171,21 @@ public class OrganizationsController : Controller
|
||||
return new OrganizationResponseModel(result.Item1);
|
||||
}
|
||||
|
||||
[HttpPost("create-without-payment")]
|
||||
[SelfHosted(NotSelfHostedOnly = true)]
|
||||
public async Task<OrganizationResponseModel> CreateWithoutPaymentAsync([FromBody] OrganizationNoPaymentCreateRequest model)
|
||||
{
|
||||
var user = await _userService.GetUserByPrincipalAsync(User);
|
||||
if (user == null)
|
||||
{
|
||||
throw new UnauthorizedAccessException();
|
||||
}
|
||||
|
||||
var organizationSignup = model.ToOrganizationSignup(user);
|
||||
var result = await _organizationService.SignUpAsync(organizationSignup);
|
||||
return new OrganizationResponseModel(result.Item1);
|
||||
}
|
||||
|
||||
[HttpPut("{id}")]
|
||||
[HttpPost("{id}")]
|
||||
public async Task<OrganizationResponseModel> Put(string id, [FromBody] OrganizationUpdateRequestModel model)
|
||||
|
Reference in New Issue
Block a user