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; namespace PARR.API.Controllers.V1 { public class TestController : BaseApiController { private readonly IClientService clientService; public TestController(IClientService clientService) { this.clientService = clientService; } /// /// Получить мой ip /// /// [HttpGet(ApiRoutes.Test.GetMyIp)] public IActionResult GetMyIp() { var ipAddress = clientService.GetClientIp(); var ip = ipAddress?.ToString(); return Ok(new Response(new { ip }, true)); } } }