From f7d10ab41b11d27152d6b67e07c3c6579413bcd9 Mon Sep 17 00:00:00 2001 From: John Lyon-Smith Date: Sat, 14 Apr 2018 06:02:10 -0700 Subject: [PATCH] Fix crash caused by typo --- mobile/src/API.js | 8 +------- mobile/src/development.js | 3 ++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/mobile/src/API.js b/mobile/src/API.js index 666afc0..66383d8 100644 --- a/mobile/src/API.js +++ b/mobile/src/API.js @@ -46,7 +46,6 @@ class API extends EventEmitter { this._apiURL = null const checkForToken = () => { - console.log(`${this._backend} - ${this.apiURL}`) AsyncStorage.getItem(authTokenKeyName) .then((token) => { if (!token) { @@ -57,13 +56,11 @@ class API extends EventEmitter { return this.who() }) .then((user) => { - console.log("token good") this.user = user this.connectSocket() this.emit("login") }) .catch(() => { - console.log("token not present") AsyncStorage.removeItem(authTokenKeyName) this.token = null this.user = {} @@ -80,14 +77,12 @@ class API extends EventEmitter { if (!this.apiURL) { return Promise.reject() } - console.log(`setting backend ${this._backend} - ${this.apiURL}`) checkForToken() }) .catch(() => { this._backend = "normal" - this.apiURL = baseURLS[this._backend] + this.apiURL = API.urls[this._backend] AsyncStorage.setItem(backendKeyName, this._backend) - console.log("setting default backend") checkForToken() }) } @@ -175,7 +170,6 @@ class API extends EventEmitter { if (newBaseURL) { this.apiURL = newBaseURL this._backend = backend - console.log(`setting backend ${this._backend} - ${this.apiURL}`) AsyncStorage.setItem(backendKeyName, this._backend).then( this.logout, this.logout diff --git a/mobile/src/development.js b/mobile/src/development.js index 5dd7622..9caa2a8 100644 --- a/mobile/src/development.js +++ b/mobile/src/development.js @@ -1,2 +1,3 @@ export const localIPAddr = "192.168.1.175" -export const defaultUser = "john@lyon-smith.org" +// export const defaultUser = "john@lyon-smith.org" +export const defaultUser = ""