Skip to content

Commit

Permalink
fixed localhost bug
Browse files Browse the repository at this point in the history
  • Loading branch information
shomilj committed Nov 26, 2020
1 parent fb54e75 commit 9ec27d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/redux/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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({
Expand Down

0 comments on commit 9ec27d3

Please sign in to comment.