PDSF (Process Data Standard Format) to use EAF for
pushing to OI
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using OI.Metrology.Server.Models;
|
||||
using OI.Metrology.Shared.Models;
|
||||
using OI.Metrology.Shared.Models.Stateless;
|
||||
@ -43,13 +42,6 @@ public partial class InboundController : ControllerBase, IInboundController<IAct
|
||||
return result;
|
||||
}
|
||||
|
||||
private static JToken GetJToken(Stream stream)
|
||||
{
|
||||
string? json = GetJson(stream);
|
||||
JToken jsonbody = string.IsNullOrEmpty(json) ? JToken.Parse("{}") : JToken.Parse(json);
|
||||
return jsonbody;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("{tooltype}")]
|
||||
public IActionResult Post(string tooltype)
|
||||
@ -62,8 +54,8 @@ public partial class InboundController : ControllerBase, IInboundController<IAct
|
||||
}
|
||||
else
|
||||
{
|
||||
JToken jsonbody = GetJToken(Request.Body);
|
||||
DataResponse dataResponse = _InboundRepository.Data(_MetrologyRepository, _InboundDataService, tooltype, jsonbody);
|
||||
string? json = GetJson(Request.Body);
|
||||
DataResponse dataResponse = _InboundRepository.Data(_MetrologyRepository, _InboundDataService, tooltype, json);
|
||||
if (!dataResponse.Errors.Any())
|
||||
return Ok(dataResponse);
|
||||
else
|
||||
|
Reference in New Issue
Block a user