Fixing username

This commit is contained in:
James Barnsley
2017-01-09 16:42:53 +13:00
parent 07097865b9
commit bebf968b64
3 changed files with 15 additions and 15 deletions

View File

@ -120,17 +120,17 @@ const PusherMiddleware = (function(){
request({ action: 'get_version' })
.then(
response => {
store.dispatch({ type: 'PUSHER_VERSION', data: response.data })
store.dispatch({ type: 'VERSION', data: response.data })
}
)
return next(action);
break;
case 'PUSHER_UPGRADING':
case 'UPGRADING':
request({ action: 'perform_upgrade' })
.then(
response => {
store.dispatch({ type: 'PUSHER_UPGRADE', data: response.data })
store.dispatch({ type: 'UPGRADE', data: response.data })
}
)
return next(action);
@ -139,19 +139,19 @@ const PusherMiddleware = (function(){
case 'PUSHER_SET_USERNAME':
request({ action: 'set_username', username: action.username })
.then(
response => {
response => {
store.dispatch({ type: 'PUSHER_USERNAME', data: { username: response.data.username }})
}
)
return next(action);
break;
case 'PUSHER_GET_CONNECTIONS':
case 'PUSHER_CLIENT_CONNECTED':
case 'GET_CONNECTIONS':
case 'NEW_CONNECTION':
request({ action: 'get_connections' })
.then(
response => {
store.dispatch({ type: 'PUSHER_CONNECTIONS', data: response.data })
store.dispatch({ type: 'CONNECTIONS', data: response.data })
}
)
return next(action);