Example #1
0
 public IActionResult Post([FromBody] object data)
 {
     Log("Start POST CalcEnergyPoint");
     try
     {
         var json = $"{data}";
         Log($"Param: {json}");
         Log("Start QueryService.AddCalcEnergyPoint");
         QueryService.AddCalcEnergyPoint(json);
         Log("End QueryService.AddCalcEnergyPoint");
         Log("End POST CalcEnergyPoint");
         return(new JsonResult("OK"));
     }
     catch (Exception ex)
     {
         Log($"Ошибка: {ex.Message}");
         return(new BadRequestObjectResult($"Ошибка: {ex.Message}"));
     }
 }