From 7406f4c97e939ff17a413641f74788ff64d0ea46 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Fri, 26 Sep 2025 10:06:29 +0530 Subject: [PATCH] Update readFiles method in SapFileController to change directory path and improve debug information --- app/Http/Controllers/SapFileController.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/SapFileController.php b/app/Http/Controllers/SapFileController.php index 0831290..141f75a 100644 --- a/app/Http/Controllers/SapFileController.php +++ b/app/Http/Controllers/SapFileController.php @@ -30,7 +30,7 @@ class SapFileController extends Controller public function readFiles() { - $path = "/var/www/"; + $path = "/LaserPRD"; $isDir = is_dir($path); $isReadable = is_readable($path); @@ -43,7 +43,6 @@ class SapFileController extends Controller 'path_checked' => $path, 'is_dir' => $isDir, 'is_readable' => $isReadable, - 'php_user' => exec('whoami'), ] ], 500); } @@ -64,15 +63,15 @@ class SapFileController extends Controller && pathinfo($file, PATHINFO_EXTENSION) === 'txt'; }); - if (empty($files)) { - return response()->json([ - 'status' => 'error', - 'message' => 'No text files found', - 'debug' => [ - 'scanned_files' => $allFiles - ] - ], 404); - } + if (empty($files)) { + return response()->json([ + 'status' => 'error', + 'message' => 'No text files found', + 'debug' => [ + 'scanned_files' => $allFiles + ] + ], 404); + } $data = [];