Set the context equal to the service, routing all method calls to the Service file
service.js
Initialize api object passed in from index.js
getStores()
Accept lat, lng, distance, and limit values, but set defaults for each when no value is passed in
Call API to get stores with filter items passed in
api.js
Initialize axios object passed in from index.js
getStores()
Accept lat, lng, distance, and limit values
Post request to HQ to retrieve stores that are within the filtered attributes
::: warning Note
Currently, the database that is querried against for the distance calculations is not set up to calculate distance. This means that when calling getStores(), all stores will be returned (but limited to the number of returned records requested). When fixed, this query should run correctly though.
:::