Skip to content
Snippets Groups Projects
Commit ba93ed0a authored by Daniel Kovacs's avatar Daniel Kovacs
Browse files

Fix

parent 8c3cfb69
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ export const getGenres = () => dispatch => { ...@@ -49,7 +49,7 @@ export const getGenres = () => dispatch => {
export const getUnsavedPlaylists = (owner) => dispatch => { export const getUnsavedPlaylists = (owner) => dispatch => {
dispatch(setUnsavedPlaylistLoading()); dispatch(setUnsavedPlaylistLoading());
console.log(owner); console.log(owner);
axios.get(`https://thespotifierapp.herokuapp.com/api/parties/${owner}/0`) axios.get(`/parties/${owner}/0`)
.then(res => .then(res =>
dispatch({ dispatch({
type: GET_UNSAVEDPLAYLISTS, type: GET_UNSAVEDPLAYLISTS,
...@@ -65,7 +65,7 @@ export const getUnsavedPlaylists = (owner) => dispatch => { ...@@ -65,7 +65,7 @@ export const getUnsavedPlaylists = (owner) => dispatch => {
export const getPartyDetails = (partyId) => dispatch => { export const getPartyDetails = (partyId) => dispatch => {
dispatch(setPartyDetailsLoading()); dispatch(setPartyDetailsLoading());
axios.get(`https://thespotifierapp.herokuapp.com/api/partydetails/${partyId}`) axios.get(`/partydetails/${partyId}`)
.then(res => .then(res =>
dispatch({ dispatch({
type: GET_PARTYDETAILS, type: GET_PARTYDETAILS,
...@@ -95,7 +95,7 @@ export const addPlaylist = (plData,history,owner) => dispatch =>{ ...@@ -95,7 +95,7 @@ export const addPlaylist = (plData,history,owner) => dispatch =>{
} }
axios axios
.post(`https://thespotifierapp.herokuapp.com/api/addparty/${owner}`,updatedplData) .post(`/addparty/${owner}`,updatedplData)
.then(res => { .then(res => {
dispatch({ dispatch({
type: ADDED_PLAYLIST, type: ADDED_PLAYLIST,
...@@ -112,10 +112,10 @@ export const addPlaylist = (plData,history,owner) => dispatch =>{ ...@@ -112,10 +112,10 @@ export const addPlaylist = (plData,history,owner) => dispatch =>{
export const savePlaylist = (body,history) => dispatch => { export const savePlaylist = (body,history) => dispatch => {
axios axios
.post(`https://thespotifierapp.herokuapp.com/api/saveplaylist/${body.id}`, body) .post(`/saveplaylist/${body.id}`, body)
.then(res => { .then(res => {
history.push('/dashboard') history.push('/dashboard')
window.location.href="https://thespotifierapp.herokuapp.com/dashboard" window.location.href="/dashboard"
dispatch({ dispatch({
type: ADDED_PLAYLIST, type: ADDED_PLAYLIST,
payload: {} payload: {}
...@@ -131,7 +131,7 @@ export const savePlaylist = (body,history) => dispatch => { ...@@ -131,7 +131,7 @@ export const savePlaylist = (body,history) => dispatch => {
export const getPlaylist = (id,history) => dispatch => export const getPlaylist = (id,history) => dispatch =>
{ {
axios axios
.get(`https://thespotifierapp.herokuapp.com/parties/danyy27/1${id}`) .get(`/parties/danyy27/1${id}`)
.then(res => { .then(res => {
history.push('/dashboard') history.push('/dashboard')
}) })
...@@ -154,10 +154,10 @@ export const editPlaylist = (id,plData,history) => dispatch => ...@@ -154,10 +154,10 @@ export const editPlaylist = (id,plData,history) => dispatch =>
export const deletePlaylist = (id,history) => dispatch => export const deletePlaylist = (id,history) => dispatch =>
{ {
axios axios
.delete(`https://thespotifierapp.herokuapp.com/api/deleteparty/${id}`) .delete(`/deleteparty/${id}`)
.then(res => { .then(res => {
history.push('/dashboard'); 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})}) .catch(err => {dispatch({type:GET_ERRORS,payload: err.response.data})})
......
...@@ -23,7 +23,7 @@ app.use(cors({origin: '*'})); ...@@ -23,7 +23,7 @@ app.use(cors({origin: '*'}));
const redirect_uri = const redirect_uri =
process.env.REDIRECT_URI || process.env.REDIRECT_URI ||
'https://thespotifierapp.herokuapp.com/callback'; 'http://thespotifierapp.herokuapp.com/callback';
let db = new sqlite3.Database('./spotifier.db', (err) => { let db = new sqlite3.Database('./spotifier.db', (err) => {
if (err) { if (err) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment