Crone Controlls Commit
This commit is contained in:
		@@ -26,6 +26,8 @@ $router->post('/api/widgets/{widgetId}/run', 'WidgetApi@run');
 | 
				
			|||||||
$router->post('/api/widgets/{widgetId}/check', 'WidgetApi@check');
 | 
					$router->post('/api/widgets/{widgetId}/check', 'WidgetApi@check');
 | 
				
			||||||
$router->post('/api/widgets/{widgetId}/detail', 'WidgetApi@detail');
 | 
					$router->post('/api/widgets/{widgetId}/detail', 'WidgetApi@detail');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//cron
 | 
				
			||||||
 | 
					$router->post('/cron/clean', 'CronApi@clean');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//Google Home - API
 | 
					//Google Home - API
 | 
				
			||||||
$router->any('/api/HA/auth', 'Oauth');
 | 
					$router->any('/api/HA/auth', 'Oauth');
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										7
									
								
								app/api/CronApi.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								app/api/CronApi.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					<?php 
 | 
				
			||||||
 | 
					class CronApi extends ApiController {
 | 
				
			||||||
 | 
					    public function clean(){
 | 
				
			||||||
 | 
					        $logKeeper = new LogKeeper();
 | 
				
			||||||
 | 
					        $logKeeper->purge(LOGTIMOUT);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user