From 00a6a333e4c9a54ac088d6b66a34fa5fdecc3dd3 Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Wed, 1 Feb 2023 14:38:59 +0500 Subject: [PATCH] WellFinalDocumentsController remove CancellationToken default value --- .../Controllers/WellFinalDocumentsController.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/AsbCloudWebApi/Controllers/WellFinalDocumentsController.cs b/AsbCloudWebApi/Controllers/WellFinalDocumentsController.cs index ee89eda6..b24898dd 100644 --- a/AsbCloudWebApi/Controllers/WellFinalDocumentsController.cs +++ b/AsbCloudWebApi/Controllers/WellFinalDocumentsController.cs @@ -46,7 +46,7 @@ namespace AsbCloudWebApi.Controllers [HttpGet("{idWell}")] [Permission] [ProducesResponseType(typeof(WellCaseDto), (int)System.Net.HttpStatusCode.OK)] - public async Task GetAsync(int idWell, CancellationToken token = default) + public async Task GetAsync(int idWell, CancellationToken token) { if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false)) return Forbid(); @@ -65,7 +65,7 @@ namespace AsbCloudWebApi.Controllers [HttpGet("{idWell}/availableUsers")] [Permission] [ProducesResponseType(typeof(IEnumerable), (int)System.Net.HttpStatusCode.OK)] - public async Task GetAvailableUsersAsync(int idWell, CancellationToken token = default) + public async Task GetAvailableUsersAsync(int idWell, CancellationToken token ) { if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false)) return Forbid(); @@ -84,7 +84,7 @@ namespace AsbCloudWebApi.Controllers [HttpPut("{idWell}")] [Permission("WellFinalDocuments.editPublisher")] [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)] - public async Task UpdateRangeAsync(int idWell, [Required] IEnumerable dtos, CancellationToken token = default) + public async Task UpdateRangeAsync(int idWell, [Required] IEnumerable dtos, CancellationToken token ) { if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false)) return Forbid(); @@ -102,7 +102,7 @@ namespace AsbCloudWebApi.Controllers [HttpPut("{idWell}/reNotifyPublishers")] [Permission("WellFinalDocuments.editPublisher")] [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)] - public async Task ReNotifyPublishersAsync(int idWell, [Required] int idCategory, CancellationToken token = default) + public async Task ReNotifyPublishersAsync(int idWell, [Required] int idCategory, CancellationToken token ) { if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false)) return Forbid(); @@ -124,7 +124,7 @@ namespace AsbCloudWebApi.Controllers [ProducesResponseType(typeof(WellFinalDocumentsHistoryDto), (int)System.Net.HttpStatusCode.OK)] public async Task GetFilesHistoryByIdCategoryAsync(int idWell, [Required] int idCategory, - CancellationToken token = default) + CancellationToken token ) { if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false)) return Forbid(); @@ -144,7 +144,7 @@ namespace AsbCloudWebApi.Controllers [HttpPost("{idWell}")] [Permission] [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)] - public async Task SaveCategoryFileAsync(int idWell, [Required] int idCategory, [Required] IFormFile file, CancellationToken token = default) + public async Task SaveCategoryFileAsync(int idWell, [Required] int idCategory, [Required] IFormFile file, CancellationToken token ) { if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false)) return Forbid(); @@ -168,7 +168,7 @@ namespace AsbCloudWebApi.Controllers return Ok(data); } - private async Task CanUserAccessToWellAsync(int idWell, CancellationToken token = default) + private async Task CanUserAccessToWellAsync(int idWell, CancellationToken token ) { int? idCompany = User.GetCompanyId(); return idCompany is not null && await wellService.IsCompanyInvolvedInWellAsync((int)idCompany,