Localstorage woes again; multiple requests; creating common components
This commit is contained in:
@ -14,12 +14,20 @@ const localstorageMiddleware = (function(){
|
||||
|
||||
case 'MOPIDY_SET_CONFIG':
|
||||
var mopidy = {
|
||||
host: action.host,
|
||||
port: action.port
|
||||
host: action.config.host,
|
||||
port: action.config.port
|
||||
};
|
||||
localStorage.setItem('mopidy', JSON.stringify(mopidy));
|
||||
break;
|
||||
|
||||
case 'SPOTIFY_SET_CONFIG':
|
||||
var spotify = {
|
||||
country: action.config.country,
|
||||
locale: action.config.locale
|
||||
};
|
||||
localStorage.setItem('spotify', JSON.stringify(spotify));
|
||||
break;
|
||||
|
||||
case 'SPOTIFY_COMPLETE_AUTHORIZATION':
|
||||
var spotify = {
|
||||
authorized: true,
|
||||
|
||||
Reference in New Issue
Block a user