All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 6m18s
Quote Demo v1
31 lines
929 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|