forked from ddrilling/AsbCloudServer
36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using AsbCloudApp.Data;
|
|
using AsbCloudApp.Services;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AsbCloudWebApi.Controllers
|
|
{
|
|
|
|
[ApiController]
|
|
[Authorize]
|
|
[Route("api/[controller]")]
|
|
public class WellCompositeOperationController : ControllerBase
|
|
{
|
|
private readonly IWellCompositeOperationService wellCompositeOperationService;
|
|
|
|
public WellCompositeOperationController(IWellCompositeOperationService wellCompositeOperationService, IWellService wellService)
|
|
{
|
|
this.wellCompositeOperationService = wellCompositeOperationService;
|
|
}
|
|
|
|
[HttpGet]
|
|
[ProducesResponseType(typeof(List<Dictionary<int, WellOperationDataDto>>), (int)System.Net.HttpStatusCode.OK)]
|
|
public async Task<IActionResult> GetAsync([FromQuery] IEnumerable<int> idsWells, CancellationToken token)
|
|
{
|
|
var result = await wellCompositeOperationService.GetAsync(idsWells, token)
|
|
.ConfigureAwait(false);
|
|
|
|
return Ok(result);
|
|
}
|
|
}
|
|
|
|
}
|