diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-01-11 15:44:50 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-01-15 16:21:31 +0100 |
| commit | 928615a5a91ef4a3f52fbd4a6629e86993a1a3aa (patch) | |
| tree | d76821ad40b0d72f359051945b2d5c415c99fca2 /app/lib/backend.js | |
| parent | fc4178d7e3329fb1fd0014e4ce349a79eafeca51 (diff) | |
| download | mullvadvpn-928615a5a91ef4a3f52fbd4a6629e86993a1a3aa.tar.xz mullvadvpn-928615a5a91ef4a3f52fbd4a6629e86993a1a3aa.zip | |
Adapt frontend to removed ip call and changed location struct
Diffstat (limited to 'app/lib/backend.js')
| -rw-r--r-- | app/lib/backend.js | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/app/lib/backend.js b/app/lib/backend.js index cd14adb045..9439e09256 100644 --- a/app/lib/backend.js +++ b/app/lib/backend.js @@ -128,12 +128,6 @@ export class Backend { } try { - await this._fetchPublicIP(); - } catch(e) { - log.error('Failed to fetch the public IP: ', e.message); - } - - try { await this._fetchLocation(); } catch(e) { log.error('Failed to fetch the location: ', e.message); @@ -359,7 +353,8 @@ export class Backend { cities: country.cities.map((city) => ({ name: city.name, code: city.code, - position: city.position, + latitude: city.latitude, + longitude: city.longitude, hasActiveRelays: city.has_active_relays, })) })); @@ -369,18 +364,6 @@ export class Backend { ); } - async _fetchPublicIP() { - await this._ensureAuthenticated(); - - const publicIp = await this._ipc.getPublicIp(); - - log.info('Got public IP: ', publicIp); - - this._store.dispatch( - connectionActions.newPublicIp(publicIp) - ); - } - async _fetchLocation() { await this._ensureAuthenticated(); @@ -389,9 +372,12 @@ export class Backend { log.info('Got location: ', location); const locationUpdate = { + ip: location.ip, country: location.country, city: location.city, - location: location.position + latitude: location.latitude, + longitude: location.longitude, + mullvadExitIp: location.mullvad_exit_ip, }; this._store.dispatch( |
