Crone Controlls Commit

This commit is contained in:
Václav Španinger 2020-07-21 10:29:26 +02:00
parent 82e5248658
commit 1a27993a94
2 changed files with 9 additions and 0 deletions

View File

@ -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}/detail', 'WidgetApi@detail');
//cron
$router->post('/cron/clean', 'CronApi@clean');
//Google Home - API
$router->any('/api/HA/auth', 'Oauth');

7
app/api/CronApi.php Normal file
View File

@ -0,0 +1,7 @@
<?php
class CronApi extends ApiController {
public function clean(){
$logKeeper = new LogKeeper();
$logKeeper->purge(LOGTIMOUT);
}
}