✨ Add billing
This commit is contained in:
21
DysonNetwork.Insight/Controllers/BillingController.cs
Normal file
21
DysonNetwork.Insight/Controllers/BillingController.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using DysonNetwork.Insight.Thought;
|
||||
using DysonNetwork.Shared.Auth;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace DysonNetwork.Insight.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("/api/billing")]
|
||||
public class BillingController(ThoughtService thoughtService, ILogger<BillingController> logger) : ControllerBase
|
||||
{
|
||||
[HttpPost("settle")]
|
||||
[Authorize]
|
||||
[RequiredPermission("maintenance", "insight.billing.settle")]
|
||||
public async Task<IActionResult> ProcessTokenBilling()
|
||||
{
|
||||
await thoughtService.SettleThoughtBills(logger);
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user