forked from ddrilling/AsbCloudServer
doc and terurn types
This commit is contained in:
parent
95a3a0d207
commit
bef1292e7c
@ -8,6 +8,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace AsbCloudWebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Контроллер секций скважины
|
||||
/// </summary>
|
||||
[Route("api/well/{idWell}/sections")]
|
||||
[ApiController]
|
||||
[Authorize]
|
||||
@ -23,6 +26,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[ProducesResponseType(typeof(IEnumerable<WellSectionDto>), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> GetAllAsync(int idWell, int skip = 0, int take = 32,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
@ -35,6 +39,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
|
||||
[HttpGet]
|
||||
[Route("{idSection}")]
|
||||
[ProducesResponseType(typeof(WellSectionDto), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> GetAsync(int idWell, int idSection,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
@ -46,6 +51,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ProducesResponseType(typeof(IEnumerable<WellSectionDto>), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> InsertAsync(int idWell, [FromBody] IEnumerable<WellSectionDto> values,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
@ -57,6 +63,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
}
|
||||
|
||||
[HttpPut("{idSection}")]
|
||||
[ProducesResponseType(typeof(WellSectionDto), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> UpdateAsync(int idWell, int idSection, [FromBody] WellSectionDto value, CancellationToken token = default)
|
||||
{
|
||||
if (!await CanUserAccessToWellAsync(idWell, token))
|
||||
@ -67,6 +74,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
}
|
||||
|
||||
[HttpDelete("{idSection}")]
|
||||
[ProducesResponseType(typeof(int), (int)System.Net.HttpStatusCode.OK)]
|
||||
public async Task<IActionResult> DeleteAsync(int idWell, int idSection, CancellationToken token = default)
|
||||
{
|
||||
if (!await CanUserAccessToWellAsync(idWell, token))
|
||||
|
Loading…
Reference in New Issue
Block a user