From c6d776a92c03f030fa902b35d823eecdad317676 Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Fri, 30 Jun 2023 17:00:27 +0500 Subject: [PATCH] =?UTF-8?q?HelpPage=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=80=D1=84=D0=BE=D0=B3=D1=80?= =?UTF-8?q?=D0=B0=D1=84=D0=B8=D1=8F,=20=D0=BC=D0=B0=D1=80=D1=88=D1=80?= =?UTF-8?q?=D1=83=D1=82=D1=8B.=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B2=D0=B0=D0=BB=D0=B8=D0=B4=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudApp/Data/HelpPageDto.cs | 2 +- AsbCloudWebApi/Controllers/HelpPageController.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/AsbCloudApp/Data/HelpPageDto.cs b/AsbCloudApp/Data/HelpPageDto.cs index 22931c3b..9044397f 100644 --- a/AsbCloudApp/Data/HelpPageDto.cs +++ b/AsbCloudApp/Data/HelpPageDto.cs @@ -19,7 +19,7 @@ public class HelpPageDto : IId public int IdCategory { get; set; } /// - /// Url страницы, которой пренадлежит справка + /// Url страницы, которой принадлежит справка /// public string UrlPage { get; set; } = null!; diff --git a/AsbCloudWebApi/Controllers/HelpPageController.cs b/AsbCloudWebApi/Controllers/HelpPageController.cs index 9607d00e..c2b30acb 100644 --- a/AsbCloudWebApi/Controllers/HelpPageController.cs +++ b/AsbCloudWebApi/Controllers/HelpPageController.cs @@ -39,9 +39,10 @@ public class HelpPageController : ControllerBase /// [HttpPost] [Permission] - [Route("upload")] [ProducesResponseType(typeof(int), (int)HttpStatusCode.OK)] - public async Task UploadAsync(string urlPage, + public async Task UploadAsync( + string urlPage, + [Range(minimum: 20000, maximum: 20000, ErrorMessage = "Категория файла недопустима. Допустимые: 20000")] int idCategory, [Required] IFormFile file, CancellationToken cancellationToken) @@ -73,7 +74,7 @@ public class HelpPageController : ControllerBase /// Токен для отмены задачи /// [HttpGet] - [Route("get/{urlPage}/{idCategory}")] + [Route("{urlPage}/{idCategory}")] [ProducesResponseType(typeof(PhysicalFileResult), (int)HttpStatusCode.OK)] [ProducesResponseType(StatusCodes.Status204NoContent)] public async Task GetFileAsync(string urlPage,