38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using CarParkValidationAPI.Authorization;
|
|
using CarParkValidationAPI.Entities;
|
|
using CarParkValidationAPI.Models;
|
|
using CarParkValidationAPI.Interface;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CarParkValidationAPI.Controllers
|
|
{
|
|
// [Authorize]
|
|
[ApiController]
|
|
[Route("api/v1/[controller]")]
|
|
public class LookupCodeController : ControllerBase
|
|
{
|
|
private readonly ILookupCode _lookupCodeService;
|
|
|
|
public LookupCodeController(ILookupCode lookupCode)
|
|
{
|
|
_lookupCodeService = lookupCode;
|
|
}
|
|
|
|
[HttpGet("[action]")]
|
|
public async Task<IActionResult> ConcessionTypes(bool onlyActive=true)
|
|
{
|
|
var retval = await _lookupCodeService.LoadConcessionTypeAsync(onlyActive);
|
|
return Ok(retval);
|
|
}
|
|
[HttpGet("[action]")]
|
|
public async Task<IActionResult> ValidationPoints(bool onlyActive= true)
|
|
{
|
|
var retval = await _lookupCodeService.LoadValidationPointAsync(onlyActive);
|
|
return Ok(retval);
|
|
}
|
|
|
|
|
|
}
|
|
}
|