Debugger; Settings polish up; Album link on track when invalid uri

This commit is contained in:
James Barnsley
2016-12-05 10:20:01 +13:00
parent 5f07e855bd
commit 33619c6b7e
14 changed files with 293 additions and 35 deletions

View File

@ -87,7 +87,35 @@ const PusherMiddleware = (function(){
break;
case 'PUSHER_INSTRUCT':
makeRequest({ action: action.action, data: action.data });
switch( action.action ){
case 'query':
makeRequest( action.data )
break
case 'broadcast':
broadcast( action.data )
break
}
break;
case 'PUSHER_DEBUG':
switch( action.call ){
case 'query':
makeRequest( action.data )
// THIS DOES NOT RETURN A PROMISE SO CAN'T DETECT RELATED RESPONSES
/*.then( response => {
store.dispatch({ type: 'DEBUG', response: response })
})*/
break
case 'broadcast':
broadcast( action.data )
/*.then( response => {
store.dispatch({ type: 'DEBUG', response: response })
})*/
break
default:
store.dispatch({ type: 'DEBUG', response: '{ "error": "Invalid call" }' })
break
}
break;
case 'PUSHER_SEND_BROADCAST':