get pointsOfInterest route params into usable vars, include request
authorLaury GvR <laury@gaslightmedia.com>
Thu, 1 Aug 2019 16:02:13 +0000 (12:02 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 1 Aug 2019 16:02:13 +0000 (12:02 -0400)
setup/routes/pointsOfInterest.php

index 53a7d1b..1beaa03 100644 (file)
@@ -59,6 +59,18 @@ class GLMA_POI_Rest_Controller
                 array(  // endpoint for getting members
                     'methods'  => WP_REST_Server::READABLE,
                     'callback' => function( $request ) {
+
+
+                        $latMin = $this->params['latMin'];
+                        $lastLatMin = $this->params['lastLatMin'];
+                        $latMax = $this->params['latMax'];
+                        $lastLatMax = $this->params['lastLatMax'];
+                        $lonMin = $this->params['lonMin'];
+                        $lastLonMin = $this->params['lastLonMin'];
+                        $lonMax = $this->params['lonMax'];
+                        $lastLonMax = $this->params['lastLonMax'];
+                        
+
                         // Callback function can be a lot shorter.
                         // You could just create a new model to get the results in an array
                         // and use return rest_ensure_response( $data );