mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 09:44:55 -06:00
get food items from heroku server
This commit is contained in:
parent
edf161099f
commit
16e970a0c7
2 changed files with 5 additions and 2 deletions
|
|
@ -14,7 +14,8 @@
|
|||
],
|
||||
"globals": {
|
||||
"Position": false,
|
||||
"navigator": false
|
||||
"navigator": false,
|
||||
"__DEV__": true
|
||||
},
|
||||
"rules": {
|
||||
// overrides
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
// @flow
|
||||
import { memoize } from 'ramda';
|
||||
|
||||
const BASE_URL = 'aretherecookies.herokuapp.com';
|
||||
|
||||
export type FoodItemsFilter = {
|
||||
radius?: number,
|
||||
};
|
||||
|
|
@ -26,7 +28,7 @@ export type FoodItemsForLocation = {
|
|||
export const getFoodItemsForLocation = memoize(
|
||||
async ({ pos: { coords: { latitude, longitude } } }: { pos: Position }): Promise<FoodItemsForLocation> => {
|
||||
try {
|
||||
return fetch('http://192.168.122.1:3000/fooditems', {
|
||||
return fetch(`https://${BASE_URL}/fooditems`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue