auto sync list management from server
This commit is contained in:
@@ -340,6 +340,28 @@ class ConfigController extends Controller {
|
||||
file_get_contents("http://localhost:2305/update-feature");
|
||||
} catch (\Exception $exc) {
|
||||
|
||||
}
|
||||
$server_ip = \app\models\SyncUrl::findOne(['key_config' => 'server_api']);
|
||||
$ip = "https://dev-dc.beetai.com";
|
||||
if ($server_ip)
|
||||
$ip = $server_ip->data;
|
||||
$device_id = \app\models\SyncUrl::findOne(['key_config' => 'device_id']);
|
||||
$id_camera = 209;
|
||||
if ($device_id)
|
||||
$id_camera = intval($device_id->data);
|
||||
try {
|
||||
file_get_contents($ip . "/api/model/reset_log_model", false, stream_context_create([
|
||||
'http' => [
|
||||
'header' => "Content-Type: application/json",
|
||||
'method' => "POST",
|
||||
'content' => json_encode([
|
||||
"idCamera" => $id_camera,
|
||||
"isCloud" => 0
|
||||
])
|
||||
]
|
||||
]));
|
||||
} catch (Exception $ex) {
|
||||
|
||||
}
|
||||
}
|
||||
return Url::to(['/config']);
|
||||
|
||||
Reference in New Issue
Block a user