using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using PARR.API.Contracts.V1;
using PARR.API.Contracts.V1.Responses.Base;
using PARR.API.Controllers.V1.Base;
using PARR.API.Services.Interfaces;
using PARR.DAL.CacheServices;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.TransformServices;
namespace PARR.API.Controllers.V1
{
[Authorize]
public class TestController : BaseApiController
{
private readonly IClientService clientService;
private readonly IEsppScheduleTransformService esppScheduleTransformService;
private readonly IRedisCacheService redisCacheService;
private readonly IWeekendDayService weekendDayService;
public TestController(
IClientService clientService,
IEsppScheduleTransformService esppScheduleTransformService,
IRedisCacheService redisCacheService,
IWeekendDayService weekendDayService
)
{
this.clientService = clientService;
this.esppScheduleTransformService = esppScheduleTransformService;
this.redisCacheService = redisCacheService;
this.weekendDayService = weekendDayService;
}
///
/// Получить мой ip
///
///
[HttpGet(ApiRoutes.Test.GetMyIp)]
public IActionResult GetMyIp()
{
var ipAddress = clientService.GetClientIp();
var ip = ipAddress?.ToString();
return Ok(new Response