phronCare/phronCare.API/Controllers/Sales/AdjustmentReasonController.cs
Leandro Hernan Rojas f1bc764bbf
All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 6m18s
Add Adjustment, Products & Tags.
Quote Demo v1
2025-05-05 22:50:02 -03:00

31 lines
929 B
C#

using Core.Interfaces;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace phronCare.API.Controllers.Sales
{
[Route("api/[controller]")]
[ApiController]
public class AdjustmentReasonController : ControllerBase
{
private readonly IAdjustmentReasonDom _adjustmentReasonDom;
public AdjustmentReasonController(IAdjustmentReasonDom adjustmentReasonService)
{
_adjustmentReasonDom = adjustmentReasonService ?? throw new ArgumentNullException(nameof(adjustmentReasonService));
}
[HttpGet("GetAll")]
public async Task<IActionResult> GetAll()
{
try
{
var result = await _adjustmentReasonDom.GetAllActiveAsync();
return Ok(result);
}
catch (Exception ex)
{
return BadRequest(ex.Message);
}
}
}
}