fix TelemetryWirelineRunOutController.PostData. It`s async.

This commit is contained in:
ngfrolov 2023-01-19 12:05:47 +05:00
parent 49678c4973
commit f7654a95b6
Signed by: ng.frolov
GPG Key ID: E99907A0357B29A7

View File

@ -48,12 +48,12 @@ namespace AsbCloudWebApi.Controllers.SAUB
[HttpPost] [HttpPost]
[Route("{uid}")] [Route("{uid}")]
[AllowAnonymous] [AllowAnonymous]
public IActionResult PostData(string uid, [FromBody] TelemetryWirelineRunOutBaseDto dto, CancellationToken token) public async Task<IActionResult> PostDataAsync(string uid, [FromBody] TelemetryWirelineRunOutBaseDto dto, CancellationToken token)
{ {
if (dto is null) if (dto is null)
return BadRequest("Dto shouldn't be null"); return BadRequest("Dto shouldn't be null");
var data = repository.AddOrUpdateAsync(uid, dto, token); var data = await repository.AddOrUpdateAsync(uid, dto, token);
var idWell = telemetryService.GetIdWellByTelemetryUid(uid); var idWell = telemetryService.GetIdWellByTelemetryUid(uid);
if (idWell is not null) if (idWell is not null)