forked from ddrilling/AsbCloudServer
Fixed FileController's routes
This commit is contained in:
parent
72510cbcf3
commit
a8cdda862a
@ -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
|
||||
/// <param name="token"> Токен отмены задачи </param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("{idWell}/files")]
|
||||
[ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> SaveFilesAsync(int idWell, int idCategory,
|
||||
int idUser, [FromForm] IFormFileCollection files, CancellationToken token = default)
|
||||
@ -84,7 +83,6 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// <param name="token"> Токен отмены задачи </param>
|
||||
/// <returns>Список информации о файлах в этой категории</returns>
|
||||
[HttpGet]
|
||||
[Route("{idWell}")]
|
||||
[ProducesResponseType(typeof(PaginationContainer<FileInfoDto>), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> GetFilesInfoAsync([FromRoute] int idWell,
|
||||
int skip = 0, int take = 32, int idCategory = default,
|
||||
@ -113,7 +111,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// <param name="token"> Токен отмены задачи </param>
|
||||
/// <returns>Запрашиваемый файл</returns>
|
||||
[HttpGet]
|
||||
[Route("{idWell}/{fileId}")]
|
||||
[Route("{fileId}")]
|
||||
[ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> GetFileAsync([FromRoute] int idWell,
|
||||
int fileId, CancellationToken token = default)
|
||||
|
Loading…
Reference in New Issue
Block a user