New source control repo for Biskilog POS - secure hub to store & manage source code. Streamlines dev process, tracks changes, & improves collaboration. Ensures reliable software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
888 B

using Biskilog_Accounting.Shared.CustomModels;
using Biskilog_Accounting.Shared.Interfaces;
using Biskilog_Accounting.Shared.POSModels;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Biskilog_Accounting.Server.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class CustomerController : ControllerBase
{
private readonly ICustomer m_customerService;
public CustomerController(ICustomer a_customerService)
{
m_customerService = a_customerService;
}
/// <summary>
/// Endpoint to return all customers
/// </summary>
[Authorize]
[HttpGet, Route("accounts")]
public IEnumerable<CustomerAccounts> GetCustomers()
{
return m_customerService.FetchCustomers();
}
}
}