Мелкие правки

This commit is contained in:
Olga Nemt 2023-04-20 15:07:03 +05:00
parent 860da5c35e
commit 4c57268433
3 changed files with 5 additions and 5 deletions

View File

@ -81,7 +81,7 @@ namespace AsbCloudDb.Model
/// статус вопроса
/// </summary>
[Column("state"), Comment("Статус вопроса")]
public int State { get; set; }
public int State { get; set; } = Faq.StateOpened;
/// <summary>
/// Счетчик повторений вопроса

View File

@ -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)
{

View File

@ -128,16 +128,16 @@ namespace AsbCloudWebApi.Controllers
}
/// <summary>
/// Удаляет вопрос
/// Помечает вопрос как удаленный
/// </summary>
/// <param name="idWell">id скважины</param>
/// <param name="id">id вопроса</param>
/// <param name="token">Токен отмены задачи</param>
/// <returns>Количество удаленных из БД строк</returns>
[HttpDelete("{id}")]
[HttpPut("{id}")]
[Permission]
[ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)]
public async Task<IActionResult> DeleteAsync(int idWell, int id, CancellationToken token)
public async Task<IActionResult> MarkAsDeletedAsync(int idWell, int id, CancellationToken token)
{
if (!await CanUserAccessToWellAsync(idWell,
token).ConfigureAwait(false))