Cron Update
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
<?php 
 | 
			
		||||
<?php
 | 
			
		||||
class CronApi extends ApiController {
 | 
			
		||||
 | 
			
		||||
    public function clean(){
 | 
			
		||||
@@ -8,7 +8,10 @@ class CronApi extends ApiController {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function fetch(){
 | 
			
		||||
        echo (new VirtualDeviceManager)->fetch('');
 | 
			
		||||
		  //echo (new VirtualDeviceManager)->fetch('');
 | 
			
		||||
		  echo (new Covid)->fetch('');
 | 
			
		||||
		  echo (new OpenWeatherMap)->fetch('');
 | 
			
		||||
 | 
			
		||||
        $this->response(['Value' => 'OK']);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -74,6 +74,7 @@ class EndpointsApi extends ApiController{
 | 
			
		||||
				'state' => 'succes',
 | 
			
		||||
				'command' => $command,
 | 
			
		||||
			], 200);
 | 
			
		||||
			die();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		//Log Data Save
 | 
			
		||||
@@ -84,6 +85,11 @@ class EndpointsApi extends ApiController{
 | 
			
		||||
				$deviceLogManager->write("[Device Log Msg] Device_ID " . $device['device_id'] . "->" . $log, LogRecordTypes::ERROR);
 | 
			
		||||
				unset($deviceLogManager);
 | 
			
		||||
			}
 | 
			
		||||
			$this->response([
 | 
			
		||||
				'state' => 'succes',
 | 
			
		||||
				'command' => $command,
 | 
			
		||||
			], 200);
 | 
			
		||||
			die();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Issuing command
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user