From e34bb4b554fd06fa5d2162c38762d04e75ddf5db Mon Sep 17 00:00:00 2001 From: KharchenkoVladimir Date: Tue, 12 Oct 2021 12:50:04 +0500 Subject: [PATCH] Renamed DrillParamsController methods --- .../Controllers/DrillParamsController.cs | 22 +++++++++---------- .../Controllers/WellOperationController.cs | 1 - 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/AsbCloudWebApi/Controllers/DrillParamsController.cs b/AsbCloudWebApi/Controllers/DrillParamsController.cs index 6220160e..24541050 100644 --- a/AsbCloudWebApi/Controllers/DrillParamsController.cs +++ b/AsbCloudWebApi/Controllers/DrillParamsController.cs @@ -10,7 +10,7 @@ namespace AsbCloudWebApi.Controllers /// /// Контроллер для режимов бурения /// - [Route("api/drillParams")] + [Route("api/drillParams/{idWell}")] [ApiController] public class DrillParamsController : ControllerBase { @@ -32,9 +32,9 @@ namespace AsbCloudWebApi.Controllers /// Конечная глубина /// Токен отмены задачи /// Значения по умолчанию для режимов бурения - [HttpGet("idWell/autoParams")] + [HttpGet("/autoParams")] [ProducesResponseType(typeof(DrillParamsDto), (int) System.Net.HttpStatusCode.OK)] - public async Task GetDefaultDrillParamsAsync(int idWell, + public async Task GetDefaultAsync(int idWell, double startDepth, double endDepth, CancellationToken token = default) { var idCompany = User.GetCompanyId(); @@ -55,9 +55,9 @@ namespace AsbCloudWebApi.Controllers /// id скважины /// Токен отмены задачи /// Список параметров для режимов бурения на скважине - [HttpGet("idWell")] + [HttpGet] [ProducesResponseType(typeof(IEnumerable), (int) System.Net.HttpStatusCode.OK)] - public async Task GetDrillParamsAsync(int idWell, + public async Task GetAllAsync(int idWell, CancellationToken token = default) { var idCompany = User.GetCompanyId(); @@ -78,9 +78,9 @@ namespace AsbCloudWebApi.Controllers /// Параметры режимов бурений для секции /// Токен отмены задачи /// - [HttpPost("idWell")] + [HttpPost] [ProducesResponseType(typeof(int), (int) System.Net.HttpStatusCode.OK)] - public async Task SaveDrillParamsAsync(int idWell, + public async Task SaveAsync(int idWell, DrillParamsDto drillParamsDto, CancellationToken token = default) { var idCompany = User.GetCompanyId(); @@ -101,9 +101,9 @@ namespace AsbCloudWebApi.Controllers /// Параметры режимов бурений для секции /// Токен отмены задачи /// - [HttpPut("idWell")] + [HttpPut] [ProducesResponseType(typeof(int), (int) System.Net.HttpStatusCode.OK)] - public async Task EditDrillParamsAsync(int idWell, + public async Task EditAsync(int idWell, DrillParamsDto drillParamsDto, CancellationToken token = default) { var idCompany = User.GetCompanyId(); @@ -125,9 +125,9 @@ namespace AsbCloudWebApi.Controllers /// Id объекта параметров режима бурений для секции /// Токен отмены задачи /// - [HttpDelete("idWell")] + [HttpDelete] [ProducesResponseType(typeof(int), (int) System.Net.HttpStatusCode.OK)] - public async Task DeleteDrillParamsAsync(int idWell, + public async Task DeleteAsync(int idWell, int drillParamsId, CancellationToken token = default) { var idCompany = User.GetCompanyId(); diff --git a/AsbCloudWebApi/Controllers/WellOperationController.cs b/AsbCloudWebApi/Controllers/WellOperationController.cs index 1a9d4ec9..8bbfd5f5 100644 --- a/AsbCloudWebApi/Controllers/WellOperationController.cs +++ b/AsbCloudWebApi/Controllers/WellOperationController.cs @@ -248,7 +248,6 @@ namespace AsbCloudWebApi.Controllers /// /// Возвращает шаблон файла импорта /// - /// Токен отмены задачи /// Запрашиваемый файл [HttpGet] [Route("tamplate")]