mirror of
https://github.com/bitwarden/server.git
synced 2025-02-28 03:51:23 +01: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);
|
||||
}
|
||||
|
||||
[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")]
|
||||
public async Task<PaymentResponseModel> PostPremium(PremiumRequestModel model)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user