From 5a9f6075636294e838de6899cbc5443e3108b4ef Mon Sep 17 00:00:00 2001 From: Katerina Date: Wed, 15 Jul 2020 23:55:59 +1000 Subject: [PATCH] urls changed from local to heroku urls --- public/trashure-client.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/trashure-client.js b/public/trashure-client.js index 9a38989..160bc8f 100644 --- a/public/trashure-client.js +++ b/public/trashure-client.js @@ -70,7 +70,8 @@ function showPosition(position, cb) { // Fetches information to be displayed const handlePinClick = function (e) { - const url = `http://localhost:8080/api/trashure_items/${e.target.metadata.id}`; + const url = `https://trashure-app.herokuapp.com/api/trashure_items/${e.target.metadata.id}`; + // const url = `http://localhost:8080/api/trashure_items/${e.target.metadata.id}`; axios.get(url).then((res) => { res.data.forEach(function (data) { document.querySelector('.description-of-item').classList.remove('hidden'); @@ -89,7 +90,8 @@ const handlePinClick = function (e) { reverseGeocode(fakevent); - const url = `http://localhost:8080/api/users/${data.owner_id}`; + const url = `https://trashure-app.herokuapp.com/api/users/${data.owner_id}`; + // const url = `http://localhost:8080/api/users/${data.owner_id}`; axios.get(url).then((res) => { document.querySelector( '.owner-of-item'