From ba93ed0a91c0265d9dec1f85d4f38bf9af03f6ad Mon Sep 17 00:00:00 2001
From: Daniel Kovacs <daniel.kovacs@inepex.com>
Date: Fri, 6 Dec 2019 05:45:28 +0100
Subject: [PATCH] Fix

---
 frontend/src/actions/playlistActions.js | 16 ++++++++--------
 server.js                               |  2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/frontend/src/actions/playlistActions.js b/frontend/src/actions/playlistActions.js
index e275d5d..263afe3 100644
--- a/frontend/src/actions/playlistActions.js
+++ b/frontend/src/actions/playlistActions.js
@@ -49,7 +49,7 @@ export const getGenres  = () => dispatch => {
 export const getUnsavedPlaylists = (owner) => dispatch => {
     dispatch(setUnsavedPlaylistLoading());
     console.log(owner);
-    axios.get(`https://thespotifierapp.herokuapp.com/api/parties/${owner}/0`)
+    axios.get(`/parties/${owner}/0`)
         .then(res =>
             dispatch({
                 type: GET_UNSAVEDPLAYLISTS,
@@ -65,7 +65,7 @@ export const getUnsavedPlaylists = (owner) => dispatch => {
 
 export const getPartyDetails = (partyId) => dispatch => {
   dispatch(setPartyDetailsLoading());
-  axios.get(`https://thespotifierapp.herokuapp.com/api/partydetails/${partyId}`)
+  axios.get(`/partydetails/${partyId}`)
   .then(res =>
       dispatch({
         type: GET_PARTYDETAILS,
@@ -95,7 +95,7 @@ export const addPlaylist = (plData,history,owner) => dispatch =>{
     }
 
     axios
-        .post(`https://thespotifierapp.herokuapp.com/api/addparty/${owner}`,updatedplData)
+        .post(`/addparty/${owner}`,updatedplData)
         .then(res => {  
             dispatch({
                 type: ADDED_PLAYLIST,
@@ -112,10 +112,10 @@ export const addPlaylist = (plData,history,owner) => dispatch =>{
 export const savePlaylist = (body,history) => dispatch => {
 
   axios
-  .post(`https://thespotifierapp.herokuapp.com/api/saveplaylist/${body.id}`, body)
+  .post(`/saveplaylist/${body.id}`, body)
   .then(res => {
     history.push('/dashboard')
-    window.location.href="https://thespotifierapp.herokuapp.com/dashboard"
+    window.location.href="/dashboard"
     dispatch({
       type: ADDED_PLAYLIST,
       payload: {}
@@ -131,7 +131,7 @@ export const savePlaylist = (body,history) => dispatch => {
 export const getPlaylist = (id,history) => dispatch =>
 {
     axios
-        .get(`https://thespotifierapp.herokuapp.com/parties/danyy27/1${id}`)
+        .get(`/parties/danyy27/1${id}`)
         .then(res => { 
             history.push('/dashboard')
         })
@@ -154,10 +154,10 @@ export const editPlaylist = (id,plData,history) => dispatch =>
 export const deletePlaylist = (id,history) => dispatch =>
 {
     axios
-        .delete(`https://thespotifierapp.herokuapp.com/api/deleteparty/${id}`)
+        .delete(`/deleteparty/${id}`)
         .then(res => {
             history.push('/dashboard');
-            window.location.href="https://thespotifierapp.herokuapp.com/dashboard"
+            window.location.href="/dashboard"
         }
         )
         .catch(err => {dispatch({type:GET_ERRORS,payload: err.response.data})})
diff --git a/server.js b/server.js
index 8a6875d..6c44bfa 100644
--- a/server.js
+++ b/server.js
@@ -23,7 +23,7 @@ app.use(cors({origin: '*'}));
 
 const redirect_uri =
     process.env.REDIRECT_URI ||
-    'https://thespotifierapp.herokuapp.com/callback';
+    'http://thespotifierapp.herokuapp.com/callback';
 
 let db = new sqlite3.Database('./spotifier.db', (err) => {
   if (err) {
-- 
GitLab