drinkrate/DrinkRateAPI/Controllers/CompanyTableController.cs

24 lines
687 B
C#

using DrinkRateAPI.ApiModels.CompanyTable;
using DrinkRateAPI.Services;
using Microsoft.AspNetCore.Mvc;
namespace DrinkRateAPI.Controllers;
[ApiController]
[Route("companyTables")]
public class CompanyTableController : ControllerBase
{
private CompanyTableService _companyTableService;
public CompanyTableController(CompanyTableService companyTableService)
{
_companyTableService = companyTableService;
}
[HttpGet("{companyTableName}")]
[Produces("application/json")]
public async Task<CompanyTableGet> GetCompanyTable([FromRoute] string companyTableName)
{
return await _companyTableService.GetCompanyTable(companyTableName);
}
}