Merge branch 'master' of github.com:lbryio/spee.ch into split-publish-timing-events

This commit is contained in:
bill bittner 2018-01-23 14:35:35 -08:00
commit 5c4e412fba
2 changed files with 9 additions and 9 deletions

View file

@ -36,7 +36,7 @@ module.exports = {
testChannelPassword: 'password', // password for the test channel
},
api: {
apiUri: 'localhost',
apiHost: 'localhost',
apiPort: '5279',
},
};

View file

@ -1,8 +1,8 @@
const axios = require('axios');
const logger = require('winston');
const config = require('../config/speechConfig.js');
const { apiUri, apiPort } = config.api;
const lbryApiUrl = 'http://' + apiUri + ':' + apiPort;
const { apiHost, apiPort } = config.api;
const lbryApiUri = 'http://' + apiHost + ':' + apiPort;
function handleLbrynetResponse ({ data }, resolve, reject) {
logger.debug('lbry api data:', data);
@ -25,7 +25,7 @@ module.exports = {
logger.debug(`lbryApi >> Publishing claim to "${publishParams.name}"`);
return new Promise((resolve, reject) => {
axios
.post(lbryApiUrl, {
.post(lbryApiUri, {
method: 'publish',
params: publishParams,
})
@ -41,7 +41,7 @@ module.exports = {
logger.debug(`lbryApi >> Getting Claim for "${uri}"`);
return new Promise((resolve, reject) => {
axios
.post(lbryApiUrl, {
.post(lbryApiUri, {
method: 'get',
params: { uri, timeout: 20 },
})
@ -57,7 +57,7 @@ module.exports = {
logger.debug(`lbryApi >> Getting claim_list for "${claimName}"`);
return new Promise((resolve, reject) => {
axios
.post(lbryApiUrl, {
.post(lbryApiUri, {
method: 'claim_list',
params: { name: claimName },
})
@ -74,7 +74,7 @@ module.exports = {
// console.log('resolving uri', uri);
return new Promise((resolve, reject) => {
axios
.post(lbryApiUrl, {
.post(lbryApiUri, {
method: 'resolve',
params: { uri },
})
@ -94,7 +94,7 @@ module.exports = {
logger.debug('lbryApi >> Retrieving the download directory path from lbry daemon...');
return new Promise((resolve, reject) => {
axios
.post(lbryApiUrl, {
.post(lbryApiUri, {
method: 'settings_get',
})
.then(({ data }) => {
@ -113,7 +113,7 @@ module.exports = {
createChannel (name) {
return new Promise((resolve, reject) => {
axios
.post(lbryApiUrl, {
.post(lbryApiUri, {
method: 'channel_new',
params: {
channel_name: name,