Add billing

This commit is contained in:
2025-10-26 21:42:53 +08:00
parent 50133684c7
commit 43e50a00ce
16 changed files with 385 additions and 10 deletions

View 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();
}
}