Пример #1
0
 public IActionResult ScanHardware()
 {
     try
     {
         _logger.LogInformation("GET /v1/Scan called");
         var hardware = _hardwareService.ScanHardware();
         return(new OkObjectResult(hardware));
     }
     catch (Exception ex)
     {
         _logger.LogError($"GET /v1/Scan endpoint caught exception: { ex.Message } Details: { ex.ToString() }");
         _logger.LogError(ex.StackTrace);
         return(NotFound());
     }
 }