Closed krishnaglick closed 9 years ago
This doesn't appear to be in-line with other api endpoints, compare what it returns to what 'users' return.
Google data takes priority, so don't include it on the restaurantLocation object. I think including the google data as individual objects and then adding restaurantLocation properties is a better approach, i.e.
{ "restaurantLocations": [ { "google fields lol": google data lol, "restaurantLocationID": null (or just not present, either works) }, { "google fields lol": google data lol, "restaurantLocationID": 1, "restaurant location fields": whatever gurl } ] }
Pusged up, waiting on Josh to get back to me.
Currently shits the bed when called with a querystring, but otherwise works. One small issue with the 'restaurantLocationID', but that should be handled on the frontend.
e.g. /api/v1/restaurantLocations - 200 /api/v1/restaurantLocations?keyword=asdf - 500 /api/v1/restaurantLocations?anything=&whatever=asdf - 500
Query params are subject to change.
Frontend location cookie needs to be named 'location', not 'locations'. Cookie will override url param. Fix pushed up.
Frontend cookie has always been named 'location' and will continue to be into the future. With most recent changes, no restaurantLocations are retrieved with or without a querystring. Ensured I had a location cookie while testing.
Should all be working and fixed!
Restaurant Locations should pull back Google data.