diff --git a/app/Http/Controllers/APIS/CustomerApi/TelemetryController.php b/app/Http/Controllers/APIS/CustomerApi/TelemetryController.php index 3cf96fd..ca3353a 100644 --- a/app/Http/Controllers/APIS/CustomerApi/TelemetryController.php +++ b/app/Http/Controllers/APIS/CustomerApi/TelemetryController.php @@ -1403,10 +1403,10 @@ class TelemetryController extends Controller return response()->json(['success' => true, 'message' => 'Device not found'], 404); } - $data = Cache::remember($cacheKey, now()->addHours(value: 1), function () use ($deviceId) { + // $data = Cache::remember($cacheKey, now()->addHours(value: 1), function () use ($deviceId) { $device = Device::find($deviceId, ['device_profile_id', 'type']); $profileId = $device->device_profile_id; - $isGasEngine = $device->type === 'Gas Engine Profile'; + $isGasEngine = $device->type === 'Gas Engine'; $cylindersToShow = ['Compression Condition','Injection Condition','Bearing Condition','Condition of Cyl Moving Parts']; if ($isGasEngine) { @@ -1476,10 +1476,10 @@ class TelemetryController extends Controller ]; } - return ['success' => true, 'data' => $data]; - }); + $response = ['success' => true, 'data' => $data]; + // }); - return response()->json($data); + return response()->json($response); } catch (Exception $e) { return response()->json(['success' => false, 'message' => $e->getMessage()], 500);