From e059221e323068ab249aa927fc8b16e0916a9647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=90=D0=BB=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D0=B0=D0=BD=D0=B4=D1=80=D0=BE=D0=B2=D0=B8=D1=87?= Date: Mon, 7 Aug 2023 09:29:31 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20?= =?UTF-8?q?=D1=80=D0=B5=D0=B2=D1=8C=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudWebApi/Controllers/AuthController.cs | 7 +++---- .../Controllers/AutoGeneratedDailyReportController.cs | 1 - AsbCloudWebApi/Controllers/DailyReportController.cs | 2 +- AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs | 2 +- AsbCloudWebApi/Controllers/ProcessMapController.cs | 2 +- .../Controllers/SAUB/DetectedOperationController.cs | 2 +- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/AsbCloudWebApi/Controllers/AuthController.cs b/AsbCloudWebApi/Controllers/AuthController.cs index 102acc8f..a041b2a5 100644 --- a/AsbCloudWebApi/Controllers/AuthController.cs +++ b/AsbCloudWebApi/Controllers/AuthController.cs @@ -34,7 +34,7 @@ namespace AsbCloudWebApi.Controllers /// новый токен /// логин и пароль не подходят [AllowAnonymous] - [HttpPost] + [HttpPost("login")] [SwaggerOperation(OperationId = "login")] [ProducesResponseType(typeof(UserTokenDto), (int)System.Net.HttpStatusCode.OK)] public async Task LoginAsync([FromBody] AuthDto auth, CancellationToken token) @@ -52,7 +52,7 @@ namespace AsbCloudWebApi.Controllers /// /// новый токен [Authorize] - [HttpGet] + [HttpGet("refresh")] [ProducesResponseType(typeof(UserTokenDto), (int)System.Net.HttpStatusCode.OK)] public async Task RefreshAsync(CancellationToken token) { @@ -70,7 +70,6 @@ namespace AsbCloudWebApi.Controllers /// Информация о новом пользователе /// Ок [HttpPost] - [Route("registration")] public IActionResult Register(UserRegistrationDto user) { var code = authService.Register(user); @@ -92,7 +91,7 @@ namespace AsbCloudWebApi.Controllers /// /// Ок [Authorize] - [HttpPut("{idUser}")] + [HttpPut("{idUser}/ChangePassword")] public IActionResult ChangePassword([FromRoute] int idUser, [FromBody] string newPassword) { var editorUserId = User.GetUserId(); diff --git a/AsbCloudWebApi/Controllers/AutoGeneratedDailyReportController.cs b/AsbCloudWebApi/Controllers/AutoGeneratedDailyReportController.cs index bc496b1e..fd2ef549 100644 --- a/AsbCloudWebApi/Controllers/AutoGeneratedDailyReportController.cs +++ b/AsbCloudWebApi/Controllers/AutoGeneratedDailyReportController.cs @@ -40,7 +40,6 @@ public class AutoGeneratedDailyReportController : ControllerBase /// /// [HttpGet] - [Route("export/excel")] [ProducesResponseType(typeof(PhysicalFileResult), (int)HttpStatusCode.OK, "application/octet-stream")] [ProducesResponseType(StatusCodes.Status204NoContent)] public async Task ExportAsync([FromRoute] int idWell, diff --git a/AsbCloudWebApi/Controllers/DailyReportController.cs b/AsbCloudWebApi/Controllers/DailyReportController.cs index fa8f750f..707421dd 100644 --- a/AsbCloudWebApi/Controllers/DailyReportController.cs +++ b/AsbCloudWebApi/Controllers/DailyReportController.cs @@ -161,7 +161,7 @@ namespace AsbCloudWebApi.Controllers /// /// /// - [HttpGet("{date}/export/excel")] + [HttpGet("{date}/excel")] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")] [ProducesResponseType(StatusCodes.Status204NoContent)] public async Task DownloadAsync(int idWell, DateOnly date, CancellationToken token) diff --git a/AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs b/AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs index dcad7eac..6b116ae3 100644 --- a/AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs +++ b/AsbCloudWebApi/Controllers/PlannedTrajectoryController.cs @@ -60,7 +60,7 @@ namespace AsbCloudWebApi.Controllers /// Токен отмены задачи /// Запрашиваемый файл [HttpGet] - [Route("export/excel")] + [Route("export")] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")] [ProducesResponseType(StatusCodes.Status204NoContent)] public async Task ExportAsync([FromRoute] int idWell, CancellationToken token) diff --git a/AsbCloudWebApi/Controllers/ProcessMapController.cs b/AsbCloudWebApi/Controllers/ProcessMapController.cs index fa803d18..97abcf11 100644 --- a/AsbCloudWebApi/Controllers/ProcessMapController.cs +++ b/AsbCloudWebApi/Controllers/ProcessMapController.cs @@ -100,7 +100,7 @@ namespace AsbCloudWebApi.Controllers /// /// /// [HttpGet] - [Route("processMapReport/export/excel/{wellId}")] + [Route("processMapReport/excel/{wellId}")] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")] [ProducesResponseType(StatusCodes.Status204NoContent)] public async Task GetReportFileAsync(int wellId, CancellationToken token) diff --git a/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs b/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs index c30b6f6b..e2bf92eb 100644 --- a/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs +++ b/AsbCloudWebApi/Controllers/SAUB/DetectedOperationController.cs @@ -122,7 +122,7 @@ namespace AsbCloudWebApi.Controllers.SAUB /// Токен отмены задачи /// Запрашиваемый файл [HttpGet] - [Route("export/excel")] + [Route("export")] [Permission] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")] [ProducesResponseType(StatusCodes.Status204NoContent)]