forked from ddrilling/AsbCloudServer
HelpPage исправлена орфография, маршруты. Добавлена валидация
This commit is contained in:
parent
a0720e9270
commit
c6d776a92c
@ -19,7 +19,7 @@ public class HelpPageDto : IId
|
||||
public int IdCategory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Url страницы, которой пренадлежит справка
|
||||
/// Url страницы, которой принадлежит справка
|
||||
/// </summary>
|
||||
public string UrlPage { get; set; } = null!;
|
||||
|
||||
|
@ -39,9 +39,10 @@ public class HelpPageController : ControllerBase
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Permission]
|
||||
[Route("upload")]
|
||||
[ProducesResponseType(typeof(int), (int)HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> UploadAsync(string urlPage,
|
||||
public async Task<IActionResult> 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
|
||||
/// <param name="cancellationToken">Токен для отмены задачи</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Route("get/{urlPage}/{idCategory}")]
|
||||
[Route("{urlPage}/{idCategory}")]
|
||||
[ProducesResponseType(typeof(PhysicalFileResult), (int)HttpStatusCode.OK)]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
public async Task<IActionResult> GetFileAsync(string urlPage,
|
||||
|
Loading…
Reference in New Issue
Block a user