From a8cdda862afda62ef4e131089e10f68339503797 Mon Sep 17 00:00:00 2001 From: KharchenkoVV Date: Mon, 16 Aug 2021 17:34:00 +0500 Subject: [PATCH] Fixed FileController's routes --- AsbCloudWebApi/Controllers/FileController.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/AsbCloudWebApi/Controllers/FileController.cs b/AsbCloudWebApi/Controllers/FileController.cs index aca12d3d..45a7accc 100644 --- a/AsbCloudWebApi/Controllers/FileController.cs +++ b/AsbCloudWebApi/Controllers/FileController.cs @@ -11,7 +11,7 @@ using System.Threading.Tasks; namespace AsbCloudWebApi.Controllers { - [Route("api/files")] + [Route("api/well/{idWell}/files")] [ApiController] [Authorize] public class FileController : ControllerBase @@ -35,7 +35,6 @@ namespace AsbCloudWebApi.Controllers /// Токен отмены задачи /// [HttpPost] - [Route("{idWell}/files")] [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)] public async Task SaveFilesAsync(int idWell, int idCategory, int idUser, [FromForm] IFormFileCollection files, CancellationToken token = default) @@ -84,7 +83,6 @@ namespace AsbCloudWebApi.Controllers /// Токен отмены задачи /// Список информации о файлах в этой категории [HttpGet] - [Route("{idWell}")] [ProducesResponseType(typeof(PaginationContainer), (int)System.Net.HttpStatusCode.OK)] public async Task GetFilesInfoAsync([FromRoute] int idWell, int skip = 0, int take = 32, int idCategory = default, @@ -113,7 +111,7 @@ namespace AsbCloudWebApi.Controllers /// Токен отмены задачи /// Запрашиваемый файл [HttpGet] - [Route("{idWell}/{fileId}")] + [Route("{fileId}")] [ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK)] public async Task GetFileAsync([FromRoute] int idWell, int fileId, CancellationToken token = default)