diff options
author | marcinzelent <zelent.marcin@gmail.com> | 2017-12-07 12:38:55 +0100 |
---|---|---|
committer | marcinzelent <zelent.marcin@gmail.com> | 2017-12-07 12:38:55 +0100 |
commit | 322b79babf45b1bff0d219cfbf10524b975075fd (patch) | |
tree | 8c446d180439567f628ee55e635daa54503d3702 /src/AppBundle/Controller/AllDataController.php | |
parent | 8ca07955ad080f97713bdd6304cea6117be1bc52 (diff) |
Split all data and data from last week, moved chart to the right side of the page.
Diffstat (limited to 'src/AppBundle/Controller/AllDataController.php')
-rw-r--r-- | src/AppBundle/Controller/AllDataController.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/AppBundle/Controller/AllDataController.php b/src/AppBundle/Controller/AllDataController.php index 86ec7c5..b45d2c9 100644 --- a/src/AppBundle/Controller/AllDataController.php +++ b/src/AppBundle/Controller/AllDataController.php @@ -2,21 +2,20 @@ namespace AppBundle\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; -use Symfony\Component\HttpFoundation\Response; use Symfony\Bundle\FrameworkBundle\Controller\Controller; class AllDataController extends Controller { /** - * @Route("/AllDataReadings", name="AllData") + * @Route("/AllData", name="AllData") */ public function GetAllData() { // Get cURL resource $curl = curl_init(); - curl_setopt($curl, CURLOPT_URL, "https://pollutometerapi.azurewebsites.net/api/Readings/lastweek"); + curl_setopt($curl, CURLOPT_URL, "https://pollutometerapi.azurewebsites.net/api/Readings"); curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-type: application/json')); // Assuming you're requesting JSON curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // Send the request & save response to $resp @@ -38,7 +37,7 @@ class AllDataController extends Controller $parametersToTwig = array("data" => $data); - return $this->render('default/AllDataPage.html.twig',$parametersToTwig); + return $this->render('default/AllData.html.twig',$parametersToTwig); } }
\ No newline at end of file |