fix multiple install ids
This commit is contained in:
parent
149d1ef61f
commit
9f1e5489a1
2 changed files with 5 additions and 5 deletions
|
@ -41,7 +41,7 @@ class SubmitEmailStage extends React.Component {
|
||||||
lbryio.call('user_email', 'new', {email: this.state.email}, 'post').then(() => {
|
lbryio.call('user_email', 'new', {email: this.state.email}, 'post').then(() => {
|
||||||
this.onEmailSaved(this.state.email);
|
this.onEmailSaved(this.state.email);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
if (error.xhr && error.xhr.status == 409) {
|
if (error.xhr && (error.xhr.status == 409 || error.message == "This email is already in use")) {
|
||||||
this.onEmailSaved(this.state.email);
|
this.onEmailSaved(this.state.email);
|
||||||
return;
|
return;
|
||||||
} else if (this._emailRow) {
|
} else if (this._emailRow) {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import {getLocal, getSession, setSession, setLocal} from './utils.js';
|
import {getSession, setSession} from './utils.js';
|
||||||
import lbry from './lbry.js';
|
import lbry from './lbry.js';
|
||||||
|
|
||||||
const querystring = require('querystring');
|
const querystring = require('querystring');
|
||||||
|
|
||||||
const lbryio = {
|
const lbryio = {
|
||||||
_accessToken: getLocal('accessToken'),
|
_accessToken: getSession('accessToken'),
|
||||||
_authenticationPromise: null,
|
_authenticationPromise: null,
|
||||||
_user : null,
|
_user : null,
|
||||||
enabled: true
|
enabled: true
|
||||||
|
@ -95,11 +95,11 @@ lbryio.call = function(resource, action, params={}, method='get', evenIfDisabled
|
||||||
};
|
};
|
||||||
|
|
||||||
lbryio.getAccessToken = () => {
|
lbryio.getAccessToken = () => {
|
||||||
return getLocal('accessToken');
|
return getSession('accessToken');
|
||||||
}
|
}
|
||||||
|
|
||||||
lbryio.setAccessToken = (token) => {
|
lbryio.setAccessToken = (token) => {
|
||||||
setLocal('accessToken', token)
|
setSession('accessToken', token)
|
||||||
}
|
}
|
||||||
|
|
||||||
lbryio.authenticate = function() {
|
lbryio.authenticate = function() {
|
||||||
|
|
Loading…
Reference in a new issue