using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using AsbCloudApp.Data;
using AsbCloudApp.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace AsbCloudWebApi.Controllers;
///
/// Ствол скважины
///
[Authorize]
[ApiController]
[Route("api/[controller]")]
public class WellboreController : ControllerBase
{
private readonly IWellboreService wellboreService;
public WellboreController(IWellboreService wellboreService)
{
this.wellboreService = wellboreService;
}
///
/// Получение списка стволов скважин
///
/// Идентификаторы скважин
///
///
[HttpGet]
[ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)]
public async Task GetAllAsync([FromQuery] IEnumerable idsWells,
CancellationToken cancellationToken)
{
var result = await wellboreService.GetWellboresAsync(idsWells, cancellationToken);
return Ok(result);
}
}