Torma Kristóf
8cd1e10cd7
All checks were successful
continuous-integration/drone/push Build is passing
38 lines
954 B
C#
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();
|
|
}
|
|
}
|
|
}
|