diff --git a/src/js/bootstrap.js b/src/js/bootstrap.js index a46d4883..79a3b84d 100755 --- a/src/js/bootstrap.js +++ b/src/js/bootstrap.js @@ -55,7 +55,10 @@ var initialState = { ui: { current_tracklist: [], current_tltrack: false, - notifications: [] + notifications: [], + config: { + authorization_url: 'https://jamesbarnsley.co.nz/auth.php' + } } }; diff --git a/src/js/components/SpotifyAuthenticationFrame.js b/src/js/components/SpotifyAuthenticationFrame.js index df7d3876..ecac652b 100755 --- a/src/js/components/SpotifyAuthenticationFrame.js +++ b/src/js/components/SpotifyAuthenticationFrame.js @@ -146,7 +146,7 @@ class SpotifyAuthenticationFrame extends React.Component{ const mapStateToProps = (state, ownProps) => { return { - authorization_url: (state.ui.config && state.ui.config.authorization_url ? state.ui.config.authorization_url : 'https://jamesbarnsley.co.nz/auth.php'), + authorization_url: state.ui.config.authorization_url, authorized: state.spotify.authorized, authorizing: state.spotify.authorizing, refreshing_token: state.spotify.refreshing_token diff --git a/src/js/services/spotify/actions.js b/src/js/services/spotify/actions.js index ee6cb011..2064e8e6 100755 --- a/src/js/services/spotify/actions.js +++ b/src/js/services/spotify/actions.js @@ -111,7 +111,7 @@ function refreshToken( dispatch, getState ){ $.ajax({ method: 'GET', - url: getState().config.authorization_url+'?action=refresh&refresh_token='+getState().spotify.refresh_token, + url: getState().ui.config.authorization_url+'?action=refresh&refresh_token='+getState().spotify.refresh_token, dataType: "json", timeout: 10000 })