Skip to content

Commit

Permalink
updated url for deploying version
Browse files Browse the repository at this point in the history
  • Loading branch information
katemat committed Jul 16, 2020
1 parent a62e168 commit 47783c1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions public/trashure-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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');
Expand All @@ -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'
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 47783c1

Please sign in to comment.