diff options
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 |