From 4c5726843342eda77fb0019ad94b0b82e7acba2e Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Thu, 20 Apr 2023 15:07:03 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudDb/Model/Faq.cs | 2 +- AsbCloudInfrastructure/Repository/FaqRepository.cs | 2 +- AsbCloudWebApi/Controllers/FaqController.cs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AsbCloudDb/Model/Faq.cs b/AsbCloudDb/Model/Faq.cs index 572b69c8..e592e632 100644 --- a/AsbCloudDb/Model/Faq.cs +++ b/AsbCloudDb/Model/Faq.cs @@ -81,7 +81,7 @@ namespace AsbCloudDb.Model /// статус вопроса /// [Column("state"), Comment("Статус вопроса")] - public int State { get; set; } + public int State { get; set; } = Faq.StateOpened; /// /// Счетчик повторений вопроса diff --git a/AsbCloudInfrastructure/Repository/FaqRepository.cs b/AsbCloudInfrastructure/Repository/FaqRepository.cs index 709f2913..004b614f 100644 --- a/AsbCloudInfrastructure/Repository/FaqRepository.cs +++ b/AsbCloudInfrastructure/Repository/FaqRepository.cs @@ -37,7 +37,7 @@ namespace AsbCloudInfrastructure.Repository if (request.IsFrequently) { - query = query.Where(o => o.IsFrequently == true); + query = query.Where(o => o.IsFrequently); } if (request.HasAnswer) { diff --git a/AsbCloudWebApi/Controllers/FaqController.cs b/AsbCloudWebApi/Controllers/FaqController.cs index ad05561a..4f013f10 100644 --- a/AsbCloudWebApi/Controllers/FaqController.cs +++ b/AsbCloudWebApi/Controllers/FaqController.cs @@ -128,16 +128,16 @@ namespace AsbCloudWebApi.Controllers } /// - /// Удаляет вопрос + /// Помечает вопрос как удаленный /// /// id скважины /// id вопроса /// Токен отмены задачи /// Количество удаленных из БД строк - [HttpDelete("{id}")] + [HttpPut("{id}")] [Permission] [ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)] - public async Task DeleteAsync(int idWell, int id, CancellationToken token) + public async Task MarkAsDeletedAsync(int idWell, int id, CancellationToken token) { if (!await CanUserAccessToWellAsync(idWell, token).ConfigureAwait(false))