using BimAI.Infrastructure.Sync;
using Microsoft.AspNetCore.Mvc;

namespace BimAI.API.Controllers;

[ApiController]
[Route("api/[controller]")]
public class SyncController(
    ProductSyncService productSyncService,
    InvoiceSyncService invoiceSyncService) : ControllerBase
{
    [HttpPost("run-product-sync")]
    public async Task<IActionResult> RunProductSync()
    {
        await productSyncService.RunAsync();
        return Ok();
    }

    [HttpPost("run-invoice-sync")]
    public async Task<IActionResult> RunInvoiceSync()
    {
        await invoiceSyncService.RunAsync();
        return Ok();
    }
}