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.

38 lines
1.1 KiB

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;
}
/// <summary>
/// Endpoint to return company information
/// </summary>
[Authorize]
[HttpGet, Route("info")]
public Task<Tblcompanydetail> GetCompanyInfo()
{
return m_companyInfo.GetCompanyInfoAsync();
}
/// <summary>
/// Endpoint to return branch information in the company
/// </summary>
[Authorize]
[HttpGet, Route("branches")]
public Task<IEnumerable<Tblbranch>> Getbranches()
{
return m_companyInfo.GetBranches();
}
}
}