forked from ddrilling/AsbCloudServer
Исправления после ревью
This commit is contained in:
parent
b3ed280d8f
commit
e059221e32
@ -34,7 +34,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// <response code="200">новый токен</response>
|
||||
/// <response code="400">логин и пароль не подходят</response>
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
[HttpPost("login")]
|
||||
[SwaggerOperation(OperationId = "login")]
|
||||
[ProducesResponseType(typeof(UserTokenDto), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> LoginAsync([FromBody] AuthDto auth, CancellationToken token)
|
||||
@ -52,7 +52,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// </summary>
|
||||
/// <returns code="200">новый токен</returns>
|
||||
[Authorize]
|
||||
[HttpGet]
|
||||
[HttpGet("refresh")]
|
||||
[ProducesResponseType(typeof(UserTokenDto), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> RefreshAsync(CancellationToken token)
|
||||
{
|
||||
@ -70,7 +70,6 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// <param name="user">Информация о новом пользователе</param>
|
||||
/// <returns code="200">Ок</returns>
|
||||
[HttpPost]
|
||||
[Route("registration")]
|
||||
public IActionResult Register(UserRegistrationDto user)
|
||||
{
|
||||
var code = authService.Register(user);
|
||||
@ -92,7 +91,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// </summary>
|
||||
/// <returns code="200">Ок</returns>
|
||||
[Authorize]
|
||||
[HttpPut("{idUser}")]
|
||||
[HttpPut("{idUser}/ChangePassword")]
|
||||
public IActionResult ChangePassword([FromRoute] int idUser, [FromBody] string newPassword)
|
||||
{
|
||||
var editorUserId = User.GetUserId();
|
||||
|
@ -40,7 +40,6 @@ public class AutoGeneratedDailyReportController : ControllerBase
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Route("export/excel")]
|
||||
[ProducesResponseType(typeof(PhysicalFileResult), (int)HttpStatusCode.OK, "application/octet-stream")]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
public async Task<IActionResult> ExportAsync([FromRoute] int idWell,
|
||||
|
@ -161,7 +161,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// <param name="date"></param>
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{date}/export/excel")]
|
||||
[HttpGet("{date}/excel")]
|
||||
[ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
public async Task<IActionResult> DownloadAsync(int idWell, DateOnly date, CancellationToken token)
|
||||
|
@ -60,7 +60,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// <param name="token"> Токен отмены задачи </param>
|
||||
/// <returns>Запрашиваемый файл</returns>
|
||||
[HttpGet]
|
||||
[Route("export/excel")]
|
||||
[Route("export")]
|
||||
[ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
public async Task<IActionResult> ExportAsync([FromRoute] int idWell, CancellationToken token)
|
||||
|
@ -100,7 +100,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
/// /// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Route("processMapReport/export/excel/{wellId}")]
|
||||
[Route("processMapReport/excel/{wellId}")]
|
||||
[ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
public async Task<IActionResult> GetReportFileAsync(int wellId, CancellationToken token)
|
||||
|
@ -122,7 +122,7 @@ namespace AsbCloudWebApi.Controllers.SAUB
|
||||
/// <param name="token"> Токен отмены задачи </param>
|
||||
/// <returns>Запрашиваемый файл</returns>
|
||||
[HttpGet]
|
||||
[Route("export/excel")]
|
||||
[Route("export")]
|
||||
[Permission]
|
||||
[ProducesResponseType(typeof(PhysicalFileResult), (int)System.Net.HttpStatusCode.OK, "application/octet-stream")]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
|
Loading…
Reference in New Issue
Block a user