diff --git a/app/Console/Commands/LdcWebStatusChecker.php b/app/Console/Commands/LdcWebStatusChecker.php new file mode 100644 index 0000000..563db63 --- /dev/null +++ b/app/Console/Commands/LdcWebStatusChecker.php @@ -0,0 +1,78 @@ + 0) { + foreach ($files as $file) { + $data['logs'] = $data['logs'] + filesize($file); + } + } + + $data['code']['version'] = app()->version(); + + // Send by cURL + $url = 'https://ldc-web.ldc.fr/api/status-checker'; + $ch = curl_init($url); + $payload = ['token' => 'CE8S52Qq7stf5k8frF4T', 'datas' => json_encode($data)]; + curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_exec($ch); + curl_close($ch); + return 0; + } +} diff --git a/clients/V2 b/clients/V2 index 9a3f118..f1398e1 160000 --- a/clients/V2 +++ b/clients/V2 @@ -1 +1 @@ -Subproject commit 9a3f1188b42c4e5b1c3d7aca55aa200d45e15167 +Subproject commit f1398e1e1405ea1eba73aa3885e9f96de872954c diff --git a/config/ldcweb.php b/config/ldcweb.php new file mode 100644 index 0000000..7c62d71 --- /dev/null +++ b/config/ldcweb.php @@ -0,0 +1,5 @@ + env('PROJECT_UUID') +];