using AsbCloudApp.Data; using AsbCloudApp.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace AsbCloudWebApi.Controllers { /// /// Контроллер сбора данных от буровых /// [Route("api/well")] [ApiController] [Authorize] public class DataController : ControllerBase { private readonly ITelemetryDataService telemetryDataService; public DataController(ITelemetryDataService telemetryDataService) { this.telemetryDataService = telemetryDataService; } /// /// Возвращает данные САУБ по скважине /// /// /// /// [HttpGet] [Route("{wellId}/data")] [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] public IActionResult Get(int wellId) { return Ok(telemetryDataService.Get(wellId)); } } }