lint
This commit is contained in:
parent
013461a8cc
commit
eefac4af0d
3 changed files with 13 additions and 55 deletions
25
dist/bundle.es.js
vendored
25
dist/bundle.es.js
vendored
|
@ -276,7 +276,7 @@ Lbryio.call = (resource, action, params = {}, method = 'get') => {
|
|||
|
||||
if (action === 'me') {
|
||||
if (tokens && tokens.access_token) {
|
||||
headers.Authorization = 'Bearer ' + tokens.access_token;
|
||||
headers.Authorization = `Bearer ${tokens.access_token}`;
|
||||
}
|
||||
|
||||
if (tokens && tokens.auth_token) {
|
||||
|
@ -284,7 +284,7 @@ Lbryio.call = (resource, action, params = {}, method = 'get') => {
|
|||
}
|
||||
} else {
|
||||
if (tokens && tokens.access_token) {
|
||||
headers.Authorization = 'Bearer ' + tokens.access_token;
|
||||
headers.Authorization = `Bearer ${tokens.access_token}`;
|
||||
} else {
|
||||
fullParams.auth_token = tokens.auth_token;
|
||||
}
|
||||
|
@ -337,22 +337,7 @@ Lbryio.getTokens = () => new Promise(resolve => {
|
|||
});
|
||||
});
|
||||
|
||||
Lbryio.getCurrentUser = () => Lbryio.call('user', 'me'); // const getAppId =
|
||||
|
||||
|
||||
Lbryio.getUserNew = options => {
|
||||
const {
|
||||
language,
|
||||
appId,
|
||||
auth_token,
|
||||
authorization
|
||||
} = options;
|
||||
Lbryio.call('user', 'new', {
|
||||
auth_token: '',
|
||||
language: language || 'en',
|
||||
app_id: appId
|
||||
}, 'post');
|
||||
};
|
||||
Lbryio.getCurrentUser = () => Lbryio.call('user', 'me');
|
||||
/**
|
||||
* LBRYIO.AUTHENTICATE()
|
||||
* @param domain
|
||||
|
@ -395,8 +380,8 @@ Lbryio.authenticate = (domain, language) => {
|
|||
if (Lbryio.authenticationPromise === null) {
|
||||
Lbryio.authenticationPromise = new Promise((resolve, reject) => {
|
||||
// see if we already have a token
|
||||
Lbryio.getAuthToken().then(token => {
|
||||
if (!token) {
|
||||
Lbryio.getTokens().then(tokens => {
|
||||
if (!tokens) {
|
||||
return false;
|
||||
} // check that token works
|
||||
|
||||
|
|
21
dist/bundle.js
vendored
21
dist/bundle.js
vendored
|
@ -569,7 +569,7 @@ Lbryio.call = function (resource, action) {
|
|||
|
||||
if (action === 'me') {
|
||||
if (tokens && tokens.access_token) {
|
||||
headers.Authorization = 'Bearer ' + tokens.access_token;
|
||||
headers.Authorization = "Bearer ".concat(tokens.access_token);
|
||||
}
|
||||
|
||||
if (tokens && tokens.auth_token) {
|
||||
|
@ -577,7 +577,7 @@ Lbryio.call = function (resource, action) {
|
|||
}
|
||||
} else {
|
||||
if (tokens && tokens.access_token) {
|
||||
headers.Authorization = 'Bearer ' + tokens.access_token;
|
||||
headers.Authorization = "Bearer ".concat(tokens.access_token);
|
||||
} else {
|
||||
fullParams.auth_token = tokens.auth_token;
|
||||
}
|
||||
|
@ -638,19 +638,6 @@ Lbryio.getTokens = function () {
|
|||
|
||||
Lbryio.getCurrentUser = function () {
|
||||
return Lbryio.call('user', 'me');
|
||||
}; // const getAppId =
|
||||
|
||||
|
||||
Lbryio.getUserNew = function (options) {
|
||||
var language = options.language,
|
||||
appId = options.appId,
|
||||
auth_token = options.auth_token,
|
||||
authorization = options.authorization;
|
||||
Lbryio.call('user', 'new', {
|
||||
auth_token: '',
|
||||
language: language || 'en',
|
||||
app_id: appId
|
||||
}, 'post');
|
||||
};
|
||||
/**
|
||||
* LBRYIO.AUTHENTICATE()
|
||||
|
@ -694,8 +681,8 @@ Lbryio.authenticate = function (domain, language) {
|
|||
if (Lbryio.authenticationPromise === null) {
|
||||
Lbryio.authenticationPromise = new Promise(function (resolve, reject) {
|
||||
// see if we already have a token
|
||||
Lbryio.getAuthToken().then(function (token) {
|
||||
if (!token) {
|
||||
Lbryio.getTokens().then(function (tokens) {
|
||||
if (!tokens) {
|
||||
return false;
|
||||
} // check that token works
|
||||
|
||||
|
|
|
@ -66,14 +66,14 @@ Lbryio.call = (resource, action, params = {}, method = 'get') => {
|
|||
// find a way to trigger deleting auth token after success
|
||||
if (action === 'me') {
|
||||
if (tokens && tokens.access_token) {
|
||||
headers.Authorization = 'Bearer ' + tokens.access_token;
|
||||
headers.Authorization = `Bearer ${tokens.access_token}`;
|
||||
}
|
||||
if (tokens && tokens.auth_token) {
|
||||
fullParams.auth_token = tokens.auth_token;
|
||||
}
|
||||
} else {
|
||||
if (tokens && tokens.access_token) {
|
||||
headers.Authorization = 'Bearer ' + tokens.access_token;
|
||||
headers.Authorization = `Bearer ${tokens.access_token}`;
|
||||
} else {
|
||||
fullParams.auth_token = tokens.auth_token;
|
||||
}
|
||||
|
@ -129,20 +129,6 @@ Lbryio.getTokens = () => new Promise(resolve => {
|
|||
|
||||
Lbryio.getCurrentUser = () => Lbryio.call('user', 'me');
|
||||
|
||||
// const getAppId =
|
||||
// Lbryio.getUserNew = (options) => {
|
||||
// const { language, appId, auth_token, authorization } = options;
|
||||
// Lbryio.call(
|
||||
// 'user',
|
||||
// 'new',
|
||||
// {
|
||||
// auth_token: '',
|
||||
// language: language || 'en',
|
||||
// app_id: appId,
|
||||
// },
|
||||
// 'post'
|
||||
// )}
|
||||
|
||||
/**
|
||||
* LBRYIO.AUTHENTICATE()
|
||||
* @param domain
|
||||
|
@ -185,8 +171,8 @@ Lbryio.authenticate = (domain, language) => {
|
|||
Lbryio.authenticationPromise = new Promise((resolve, reject) => {
|
||||
// see if we already have a token
|
||||
Lbryio.getTokens()
|
||||
.then(token => {
|
||||
if (!token) {
|
||||
.then(tokens => {
|
||||
if (!tokens) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue