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
			
		
		
			
		
	
	
					38 lines
				
				1.1 KiB
			| 
											2 years ago
										 | 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(); | ||
|  |         } | ||
|  |     } | ||
|  | } |