From 322b79babf45b1bff0d219cfbf10524b975075fd Mon Sep 17 00:00:00 2001 From: marcinzelent Date: Thu, 7 Dec 2017 12:38:55 +0100 Subject: Split all data and data from last week, moved chart to the right side of the page. --- src/AppBundle/Controller/AllDataController.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/AppBundle/Controller/AllDataController.php') 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 -- cgit v1.2.3