From 47783c172edb9500e1eef95d888e85b20a9078a8 Mon Sep 17 00:00:00 2001 From: Katerina Date: Thu, 16 Jul 2020 19:57:48 +1000 Subject: [PATCH] updated url for deploying version --- public/trashure-client.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/trashure-client.js b/public/trashure-client.js index d8d34f5..750a3ed 100644 --- a/public/trashure-client.js +++ b/public/trashure-client.js @@ -26,7 +26,7 @@ const reverseGeocode = function (e) { }); } else { var searchRequest = { - // loca arguement to be passed in + // local argument to be passed in location: e.location, callback: function (r) { //Tell the user the name of the result. @@ -70,8 +70,8 @@ function showPosition(position, cb) { // Fetches information to be displayed const handlePinClick = function (e) { - // 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}`; + 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'); @@ -90,8 +90,8 @@ const handlePinClick = function (e) { reverseGeocode(fakevent); - // const url = `https://trashure-app.herokuapp.com/api/users/${data.owner_id}`; - 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' @@ -155,8 +155,8 @@ function getMap() { var center = map.getCenter(); - // const url = 'https://trashure-app.herokuapp.com/api/trashure_items'; - const url = 'http://localhost:8080/api/trashure_items'; + const url = 'https://trashure-app.herokuapp.com/api/trashure_items'; + // const url = 'http://localhost:8080/api/trashure_items'; axios.get(url).then((res) => { res.data.forEach(function (data) {