forked from ddrilling/AsbCloudServer
4db67113b4
CrudCacheService Адаптировано для новой схемы кеширования. Убраны extention методы для mapster.
28 lines
756 B
C#
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();
|
|
}
|
|
}
|
|
}
|