2021-09-10 11:28:57 +05:00
|
|
|
|
using AsbCloudApp.Data;
|
|
|
|
|
using AsbCloudApp.Services;
|
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
namespace AsbCloudWebApi.Controllers
|
|
|
|
|
{
|
|
|
|
|
[Route("api/admin/well")]
|
|
|
|
|
[ApiController]
|
|
|
|
|
[Authorize]
|
|
|
|
|
public class AdminWellController : CrudController<WellDto, ICrudService<WellDto>>
|
|
|
|
|
{
|
2021-12-21 11:52:53 +05:00
|
|
|
|
public AdminWellController(IWellService service)
|
2021-09-10 11:28:57 +05:00
|
|
|
|
:base(service)
|
|
|
|
|
{
|
2022-01-05 17:50:45 +05:00
|
|
|
|
service.Includes.Add("Telemetry");
|
2021-09-10 11:28:57 +05:00
|
|
|
|
}
|
2021-12-21 11:52:53 +05:00
|
|
|
|
|
2022-01-05 17:50:45 +05:00
|
|
|
|
[HttpPost("EnshureTimezonesIsSet")]
|
2022-01-19 11:42:26 +05:00
|
|
|
|
[Permission]
|
2022-01-05 17:50:45 +05:00
|
|
|
|
public IActionResult EnsureTimestamps()
|
|
|
|
|
{
|
|
|
|
|
((IWellService)service).EnshureTimezonesIsSet();
|
|
|
|
|
return Ok();
|
|
|
|
|
}
|
2021-09-10 11:28:57 +05:00
|
|
|
|
}
|
|
|
|
|
}
|