DD.WellWorkover.Cloud/AsbCloudWebApi/Controllers/AdminWellController.cs

31 lines
864 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
{
/// <summary>
/// Редактор скважин для админки
/// </summary>
[Route("api/admin/well")]
[ApiController]
[Authorize]
public class AdminWellController : CrudController<WellDto, ICrudRepository<WellDto>>
{
public AdminWellController(IWellService service)
: base(service)
{ }
[HttpPost("EnshureTimezonesIsSet")]
[Permission]
public async Task<IActionResult> EnshureTimezonesIsSet(CancellationToken token)
{
await ((IWellService)service).EnshureTimezonesIsSetAsync(token);
return Ok();
}
}
}