From 9ec27d3a997ddb309f5ff8d511c62559d13f7ec8 Mon Sep 17 00:00:00 2001 From: Shomil Jain Date: Wed, 25 Nov 2020 19:32:19 -0800 Subject: [PATCH] fixed localhost bug --- client/src/redux/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/redux/actions.js b/client/src/redux/actions.js index b0114e1..dd11ff5 100644 --- a/client/src/redux/actions.js +++ b/client/src/redux/actions.js @@ -2,7 +2,7 @@ import { UPDATE_SEARCH, SELECT_POST } from "./actionTypes"; export const updateSearch = filters => { return (dispatch) => { - fetch('http://localhost:8080/query', {method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(filters)}) + fetch('/query', {method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(filters)}) .then(data => data.json()) .then(data => { dispatch({ @@ -15,7 +15,7 @@ export const updateSearch = filters => { export const selectPost = id => { return (dispatch) => { - fetch('http://localhost:8080/content', {method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({'id': id})}) + fetch('/content', {method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({'id': id})}) .then(data => data.json()) .then(content => { dispatch({