allow discover if lbryio is disabled
This commit is contained in:
parent
a937534a8b
commit
6603bb4cd2
1 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ const lbryio = {
|
||||||
enabled: false
|
enabled: false
|
||||||
};
|
};
|
||||||
|
|
||||||
const CONNECTION_STRING = 'http://localhost:8080/';
|
const CONNECTION_STRING = 'https://api.lbry.io/';
|
||||||
|
|
||||||
const mocks = {
|
const mocks = {
|
||||||
'reward_type.get': ({name}) => {
|
'reward_type.get': ({name}) => {
|
||||||
|
@ -26,7 +26,7 @@ const mocks = {
|
||||||
|
|
||||||
lbryio.call = function(resource, action, params={}, method='get') {
|
lbryio.call = function(resource, action, params={}, method='get') {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (!lbryio.enabled) {
|
if (!lbryio.enabled && (resource != 'discover' || action != 'list')) {
|
||||||
reject(new Error("LBRY interal API is disabled"))
|
reject(new Error("LBRY interal API is disabled"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue