update
This commit is contained in:
@@ -132,14 +132,10 @@ class JsonTransferController extends Controller
|
||||
if (session('previlage') !== 'developer') {
|
||||
abort(403, 'Akses ditolak. Anda tidak memiliki izin untuk menjalankan git pull.');
|
||||
}
|
||||
$gitPath = '/var/www/html/lis/';
|
||||
|
||||
// Jalankan git pull
|
||||
$gitPath = base_path();
|
||||
$output = shell_exec("cd {$gitPath} && git pull 2>&1");
|
||||
|
||||
// Simpan log siapa yang menjalankan (opsional)
|
||||
if (auth()->check()) {
|
||||
Log::info('Git pull executed by user: ' . auth()->user()->email);
|
||||
Log::info('Git pull executed by user: ' . auth()->user()->email.' at '.now());
|
||||
}
|
||||
|
||||
return back()->with('git_output', $output);
|
||||
|
||||
Reference in New Issue
Block a user