Sync products with old e5 CRM
This commit is contained in:
@@ -5,8 +5,8 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Bimix.API.Controllers;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class ProductsController(BimixDbContext context) : ControllerBase
|
||||
{
|
||||
private readonly BimixDbContext _context = context;
|
||||
|
||||
16
Bimix.API/Controllers/SyncController.cs
Normal file
16
Bimix.API/Controllers/SyncController.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Bimix.Infrastructure.Sync;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Bimix.API.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class SyncController(ProductSyncService productSyncService) : ControllerBase
|
||||
{
|
||||
[HttpPost("run-product-sync")]
|
||||
public async Task<IActionResult> RunProductSync()
|
||||
{
|
||||
await productSyncService.RunAsync();
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user