1
0
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:
Kyle Spearrin 2019-09-19 08:53:33 -04:00
parent e9174ba9f4
commit d73e2da7a4

View File

@ -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)
{