From f5e00d7a5c62d7b8064598746acc5c50219de3b1 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: Tue, 18 Jul 2023 16:38:49 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D0=B0=20=D0=B2?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BD=D1=82=D1=80=D0=BE=D0=BB=D0=BB=D0=B5=D1=80?= =?UTF-8?q?=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/HelpPageController.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/AsbCloudWebApi/Controllers/HelpPageController.cs b/AsbCloudWebApi/Controllers/HelpPageController.cs index 99014b02..538ac31e 100644 --- a/AsbCloudWebApi/Controllers/HelpPageController.cs +++ b/AsbCloudWebApi/Controllers/HelpPageController.cs @@ -35,7 +35,7 @@ public class HelpPageController : ControllerBase /// /// Загрузка файла справки /// - /// Url страницы + /// Url страницы /// Id категории файла. Допустимое значение параметра: 20000 /// Файл справки /// Токен для отмены задачи @@ -44,7 +44,7 @@ public class HelpPageController : ControllerBase [Permission] [ProducesResponseType(typeof(int), (int)HttpStatusCode.OK)] public async Task UploadAsync( - [Required] string urlPage, + [Required] string key, [Range(minimum: 20000, maximum: 20000, ErrorMessage = "Категория файла недопустима. Допустимые: 20000")] int idCategory, [Required] IFormFile file, @@ -60,7 +60,7 @@ public class HelpPageController : ControllerBase using var fileStream = file.OpenReadStream(); - int helpPageId = await helpPageService.AddOrUpdateAsync(urlPage, + int helpPageId = await helpPageService.AddOrUpdateAsync(key, idCategory, file.FileName, fileStream, @@ -72,7 +72,7 @@ public class HelpPageController : ControllerBase /// /// Получение файла справки /// - /// Url страницы + /// Url страницы /// Id категории файла. Допустимое значение параметра: 20000 /// Токен для отмены задачи /// @@ -80,12 +80,12 @@ public class HelpPageController : ControllerBase [ProducesResponseType(typeof(PhysicalFileResult), (int)HttpStatusCode.OK)] [ProducesResponseType(StatusCodes.Status204NoContent)] public async Task GetFileAsync( - [Required] string urlPage, + [Required] string key, [Range(minimum: 20000, maximum: 20000, ErrorMessage = "Категория файла недопустима. Допустимые: 20000")] int idCategory, CancellationToken cancellationToken) { - var file = await helpPageService.GetFileStreamAsync(urlPage, + var file = await helpPageService.GetFileStreamAsync(key, idCategory, cancellationToken); @@ -102,7 +102,7 @@ public class HelpPageController : ControllerBase /// /// Проверяет наличие справки для страницы /// - /// Url страницы + /// Url страницы /// Id категории файла. Допустимое значение параметра: 20000 /// /// @@ -110,12 +110,12 @@ public class HelpPageController : ControllerBase [Route("isExisting")] [ProducesResponseType(typeof(bool), (int)HttpStatusCode.OK)] public async Task IsExistingAsync( - [Required] string urlPage, + [Required] string key, [Range(minimum: 20000, maximum: 20000, ErrorMessage = "Категория файла недопустима. Допустимые: 20000")] int idCategory, CancellationToken cancellationToken) { - var helpPage = await helpPageRepository.GetOrDefaultByUrlPageAndIdCategoryAsync(urlPage, + var helpPage = await helpPageRepository.GetOrDefaultByUrlPageAndIdCategoryAsync(key, idCategory, cancellationToken);