diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapBaseController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapBaseController.cs index 1377a15a..14a669f2 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapBaseController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapBaseController.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using AsbCloudApp.Data; @@ -147,8 +148,7 @@ public abstract class ProcessMapBaseController : ControllerBase /// /// [HttpGet] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] - public async Task GetAsync(int idWell, CancellationToken cancellationToken) + public async Task>> GetAsync(int idWell, CancellationToken cancellationToken) { var processMaps = await repository.GetByIdWellAsync(idWell, cancellationToken); @@ -163,9 +163,9 @@ public abstract class ProcessMapBaseController : ControllerBase /// /// [HttpGet("/api/[controller]/telemetry/{uid}")] - [ProducesResponseType(typeof(int), StatusCodes.Status200OK)] + [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - public async Task GetProcessMapPlanByTelemetry(string uid, DateTime updateFrom, CancellationToken cancellationToken) + public async Task>> GetProcessMapPlanByTelemetry(string uid, DateTime updateFrom, CancellationToken cancellationToken) { var idWell = telemetryService.GetIdWellByTelemetryUid(uid); @@ -198,11 +198,11 @@ public abstract class ProcessMapBaseController : ControllerBase protected async Task NotifyUsersBySignalR(int idWell, CancellationToken cancellationToken) { - var wellDrillingProcessMaps = await repository.GetByIdWellAsync(idWell, cancellationToken); + var dtos = await repository.GetByIdWellAsync(idWell, cancellationToken); await telemetryHubContext.Clients .Group($"{SignalRMethod}_{idWell}") - .SendAsync("UpdateProcessMap", wellDrillingProcessMaps, cancellationToken); + .SendAsync("UpdateProcessMap", dtos, cancellationToken); } private async Task CheckIsExistsWellSectionTypeAsync(int idWellSectionType, CancellationToken cancellationToken) diff --git a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellDrillingController.cs b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellDrillingController.cs index d37869e3..d1b2ba6e 100644 --- a/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellDrillingController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMaps/ProcessMapWellDrillingController.cs @@ -1,4 +1,5 @@ -using System.ComponentModel.DataAnnotations; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.IO; using System.Threading; using System.Threading.Tasks; @@ -46,7 +47,7 @@ public class ProcessMapWellDrillingController : ProcessMapBaseController /// [HttpGet("report")] - [ProducesResponseType(typeof(ProcessMapPlanWellDrillingDto), StatusCodes.Status200OK)] + [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] public async Task GetReportAsync(int idWell, CancellationToken cancellationToken) { var report = await processMapReportWellDrillingService.GetAsync(idWell, cancellationToken);