Snapcast to BEM
This commit is contained in:
@ -75,9 +75,9 @@ export function connectionRemoved(connection){
|
||||
}
|
||||
}
|
||||
|
||||
export function instruct(method, params = null, response_callback = null, error_callback = null){
|
||||
export function request(method, params = null, response_callback = null, error_callback = null){
|
||||
return {
|
||||
type: 'PUSHER_INSTRUCT',
|
||||
type: 'PUSHER_REQUEST',
|
||||
method: method,
|
||||
params: params,
|
||||
response_callback: response_callback,
|
||||
|
||||
@ -244,7 +244,7 @@ const PusherMiddleware = (function(){
|
||||
next(action);
|
||||
break;
|
||||
|
||||
case 'PUSHER_INSTRUCT':
|
||||
case 'PUSHER_REQUEST':
|
||||
request(store, action.method, action.params)
|
||||
.then(
|
||||
response => {
|
||||
@ -257,8 +257,10 @@ const PusherMiddleware = (function(){
|
||||
store.dispatch(action.error_callback.call(this, error));
|
||||
} else {
|
||||
store.dispatch(coreActions.handleException(
|
||||
'Instruct failed',
|
||||
error
|
||||
'Pusher request failed',
|
||||
error,
|
||||
action.method,
|
||||
action
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user