update config API
This commit is contained in:
@@ -81,7 +81,7 @@ class ApiController extends Controller {
|
||||
"Confidence" => strval($post["confidence"])
|
||||
]);
|
||||
$server_ip = \app\models\SyncUrl::findOne(['key_config' => 'server_api']);
|
||||
$ip = "dev-dc.beetai.com";
|
||||
$ip = "https://dev-dc.beetai.com";
|
||||
if ($server_ip)
|
||||
$ip = $server_ip->data;
|
||||
if ($this->is_connected($ip) && $logs) {
|
||||
@@ -91,7 +91,7 @@ class ApiController extends Controller {
|
||||
$id_camera = intval($device_id->data);
|
||||
$logsInfo = CaptureLogs::findOne($logs);
|
||||
$staffInfo = ListManagement::findOne($post['id']);
|
||||
$res = json_decode(file_get_contents("https://" . $ip . "/api/oem/face_recognition", false, stream_context_create([
|
||||
$res = json_decode(file_get_contents($ip . "/api/oem/face_recognition", false, stream_context_create([
|
||||
'http' => [
|
||||
'header' => "Content-Type: application/json",
|
||||
'method' => "POST",
|
||||
@@ -283,7 +283,7 @@ class ApiController extends Controller {
|
||||
Yii::$app->response->format = "json";
|
||||
if ($this->is_connected()) {
|
||||
$server_ip = \app\models\SyncUrl::findOne(['key_config' => 'server_api']);
|
||||
$ip = "dev-dc.beetai.com";
|
||||
$ip = "https://dev-dc.beetai.com";
|
||||
if ($server_ip)
|
||||
$ip = $server_ip->data;
|
||||
$device_id = \app\models\SyncUrl::findOne(['key_config' => 'device_id']);
|
||||
@@ -293,7 +293,7 @@ class ApiController extends Controller {
|
||||
$ls = CaptureLogs::find()->andWhere(['sync_status' => null])->all();
|
||||
foreach ($ls as $key => $value) {
|
||||
$staffInfo = ListManagement::findOne($value->staff_id);
|
||||
$res = json_decode(file_get_contents("https://" . $ip . "/api/oem/face_recognition", false, stream_context_create([
|
||||
$res = json_decode(file_get_contents($ip . "/api/oem/face_recognition", false, stream_context_create([
|
||||
'http' => [
|
||||
'header' => "Content-Type: application/json",
|
||||
'method' => "POST",
|
||||
|
||||
Reference in New Issue
Block a user