DD.WellWorkover.Cloud/AsbCloudWebApi/Controllers/AdminWellController.cs
ngfrolov 4db67113b4 CrudService очищен от неиспользуемого кода.
CrudCacheService Адаптировано для новой схемы кеширования.
Убраны extention методы для mapster.
2022-06-06 15:43:47 +05:00

28 lines
756 B
C#

using AsbCloudApp.Data;
using AsbCloudApp.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Threading;
using System.Threading.Tasks;
namespace AsbCloudWebApi.Controllers
{
[Route("api/admin/well")]
[ApiController]
[Authorize]
public class AdminWellController : CrudController<WellDto, ICrudService<WellDto>>
{
public AdminWellController(IWellService service)
: base(service)
{}
[HttpPost("EnshureTimezonesIsSet")]
[Permission]
public async Task<IActionResult> EnsureTimestamps(CancellationToken token)
{
await ((IWellService)service).EnshureTimezonesIsSetAsync(token);
return Ok();
}
}
}