1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-19 00:21:35 -05:00

user premium validation job

This commit is contained in:
Kyle Spearrin
2017-08-22 15:27:29 -04:00
parent 8e5d541be6
commit 0ea87d1c1c
16 changed files with 162 additions and 56 deletions

View File

@ -1,38 +0,0 @@
using Bit.Core.Services;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using System.Threading.Tasks;
namespace Bit.Billing.Controllers
{
[Route("jobs")]
public class JobsController : Controller
{
private readonly BillingSettings _billingSettings;
private readonly IOrganizationService _organizationService;
private readonly IUserService _userService;
public JobsController(
IOptions<BillingSettings> billingSettings,
IOrganizationService organizationService,
IUserService userService)
{
_billingSettings = billingSettings?.Value;
_organizationService = organizationService;
_userService = userService;
}
[HttpPost("expirations")]
public async Task<IActionResult> PostExpirations([FromQuery] string key)
{
if(key != _billingSettings.JobsKey)
{
return new BadRequestResult();
}
// TODO check for all users/orgs that are expired and disable them
return new OkResult();
}
}
}