mirror of
https://github.com/bitwarden/server.git
synced 2025-04-21 21:15:10 -05:00
iap pre-check
This commit is contained in:
parent
e9174ba9f4
commit
d73e2da7a4
@ -441,6 +441,17 @@ namespace Bit.Api.Controllers
|
|||||||
throw new BadRequestException(ModelState);
|
throw new BadRequestException(ModelState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost("iap-check")]
|
||||||
|
public async Task PostIapCheck(IapCheckRequestModel model)
|
||||||
|
{
|
||||||
|
var user = await _userService.GetUserByPrincipalAsync(User);
|
||||||
|
if(user == null)
|
||||||
|
{
|
||||||
|
throw new UnauthorizedAccessException();
|
||||||
|
}
|
||||||
|
await _userService.IapCheckAsync(user, model.PaymentMethodType.Value);
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost("premium")]
|
[HttpPost("premium")]
|
||||||
public async Task<PaymentResponseModel> PostPremium(PremiumRequestModel model)
|
public async Task<PaymentResponseModel> PostPremium(PremiumRequestModel model)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user