forked from Mirrors/freeswitch
FS-8205 [verto_communicator] fix config reload
This commit is contained in:
parent
77fd36fa24
commit
b213ceaf51
@ -100,8 +100,23 @@
|
||||
});
|
||||
|
||||
result['promise'] = configPromise;
|
||||
|
||||
var connectCallback = function(v, connected) {
|
||||
verto.data.connecting = false;
|
||||
if (connected) {
|
||||
storage.data.ui_connected = verto.data.connected;
|
||||
storage.data.ws_connected = verto.data.connected;
|
||||
storage.data.name = verto.data.name;
|
||||
storage.data.email = verto.data.email;
|
||||
storage.data.login = verto.data.login;
|
||||
storage.data.password = verto.data.password;
|
||||
resolve(result);
|
||||
}
|
||||
};
|
||||
|
||||
verto.data.connecting = true;
|
||||
verto.connect(connectCallback);
|
||||
|
||||
resolve(result);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -31,10 +31,6 @@
|
||||
$location.path('/');
|
||||
}
|
||||
|
||||
$rootScope.$on('config.http.success', function(ev) {
|
||||
$scope.login();
|
||||
});
|
||||
|
||||
/**
|
||||
* Login the user to verto server and
|
||||
* redirects him to dialpad page.
|
||||
|
@ -61,10 +61,8 @@ vertoService.service('config', ['$rootScope', '$http', '$location', 'storage', '
|
||||
verto.data.autologin_done = true;
|
||||
}
|
||||
|
||||
$rootScope.$emit('config.http.success', data);
|
||||
return response;
|
||||
}, function(response) {
|
||||
$rootScope.$emit('config.http.error', response);
|
||||
return response;
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user