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 CompanyInfoController : ControllerBase
{
private readonly ICompanyInfo m_companyInfo;
public CompanyInfoController(ICompanyInfo a_companyInfo)
{
m_companyInfo = a_companyInfo;
}
///
/// Endpoint to return company information
///
[Authorize]
[HttpGet, Route("info")]
public Task GetCompanyInfo()
{
return m_companyInfo.GetCompanyInfoAsync();
}
///
/// Endpoint to return branch information in the company
///
[Authorize]
[HttpGet, Route("branches")]
public Task> Getbranches()
{
return m_companyInfo.GetBranches();
}
}
}