2025-10-11 11:33:46 +02:00
|
|
|
using BimAI.Infrastructure.Sync;
|
2025-06-23 21:52:09 +02:00
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
2025-10-11 11:33:46 +02:00
|
|
|
namespace BimAI.API.Controllers;
|
2025-06-23 21:52:09 +02:00
|
|
|
|
|
|
|
|
[ApiController]
|
|
|
|
|
[Route("api/[controller]")]
|
2025-11-27 23:52:32 +01:00
|
|
|
public class SyncController(
|
|
|
|
|
ProductSyncService productSyncService,
|
|
|
|
|
InvoiceSyncService invoiceSyncService) : ControllerBase
|
2025-06-23 21:52:09 +02:00
|
|
|
{
|
|
|
|
|
[HttpPost("run-product-sync")]
|
|
|
|
|
public async Task<IActionResult> RunProductSync()
|
|
|
|
|
{
|
|
|
|
|
await productSyncService.RunAsync();
|
|
|
|
|
return Ok();
|
|
|
|
|
}
|
2025-11-27 23:52:32 +01:00
|
|
|
|
|
|
|
|
[HttpPost("run-invoice-sync")]
|
|
|
|
|
public async Task<IActionResult> RunInvoiceSync()
|
|
|
|
|
{
|
|
|
|
|
await invoiceSyncService.RunAsync();
|
|
|
|
|
return Ok();
|
|
|
|
|
}
|
2025-06-23 21:52:09 +02:00
|
|
|
}
|