aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/AppBundle/Controller/HomeController.php5
-rw-r--r--src/AppBundle/Controller/NewDataController.php7
-rw-r--r--src/AppBundle/Utils/EmailSender.php49
3 files changed, 54 insertions, 7 deletions
diff --git a/src/AppBundle/Controller/HomeController.php b/src/AppBundle/Controller/HomeController.php
index ca2043e..70bd323 100644
--- a/src/AppBundle/Controller/HomeController.php
+++ b/src/AppBundle/Controller/HomeController.php
@@ -11,6 +11,7 @@ namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use AppBundle\Utils\Aqi;
+use AppBundle\Utils\EmailSender;
class HomeController extends Controller
{
@@ -19,8 +20,10 @@ class HomeController extends Controller
*/
- public function numberAction(Aqi $aqi)
+ public function numberAction(Aqi $aqi, EmailSender $emailSender)
{
+ $emailSender->main();
+
$table = array(
'Co' => array('breakpoints' => [0, 4.4, 4.5, 9.4, 9.5, 12.4, 12.5, 15.4, 15.5, 30.4, 30.5, 40.4, 40.5, 50.4],