hanyadikhetvan-dotnethf/HanyadikHetVan/Controllers/V1/HanyadikHetVanController.cs
Torma Kristóf 8cd1e10cd7
All checks were successful
continuous-integration/drone/push Build is passing
require admin role
2021-05-19 05:08:00 +02:00

38 lines
954 B
C#

using HanyadikHetVan.DTO;
using HanyadikHetVan.Services;
using Microsoft.AspNetCore.Mvc;
using System.Net.Mime;
namespace HanyadikHetVan.Controllers.V1
{
[ApiController]
[ApiVersion("1.0")]
[Route("api/v{version:apiVersion}/[controller]")]
public class HanyadikHetVanController : Controller
{
private readonly HanyadikHetVanJsonService _jsonservice;
private readonly HanyadikHetVanService _service;
public HanyadikHetVanController(HanyadikHetVanJsonService jsonservice, HanyadikHetVanService service)
{
_jsonservice = jsonservice;
_service = service;
}
[HttpGet("json")]
[Produces(MediaTypeNames.Application.Json)]
public HanyadikHetVanDTO GetJson()
{
return _jsonservice.HanyadikHetVan();
}
[HttpGet]
public int Get()
{
return _service.HanyadikHetVan();
}
}
}