From b4679a5a00eb3d90e74e86fe4602d88d16c7b20a Mon Sep 17 00:00:00 2001 From: bill bittner Date: Wed, 31 May 2017 20:54:56 -0700 Subject: [PATCH] updated uri --- helpers/lbryApi.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/helpers/lbryApi.js b/helpers/lbryApi.js index 25351e5f..6170d83e 100644 --- a/helpers/lbryApi.js +++ b/helpers/lbryApi.js @@ -40,8 +40,8 @@ function orderTopClaims(claimsListArray){ function getClaimWithUri(uri, resolve, reject){ console.log(">> making get request to lbry daemon"); axios.post('http://localhost:5279/lbryapi', { - method: "get", - params: { uri: uri } + "method": "get", + "params": { "uri": uri } } ).then(function (getUriResponse) { console.log(">> 'get claim' success..."); @@ -65,7 +65,7 @@ function getClaimWithUri(uri, resolve, reject){ } function findAllClaims(name, resolve, reject){ - // abstract claim_list function to here + // to do: abstract claim_list function to here } module.exports = { @@ -102,9 +102,9 @@ module.exports = { var deferred = new Promise(function (resolve, reject){ // 2. code to resolve or reject the promise // make a call to the daemon to get the claims list - axios.post('http://localhost:5279/lbryapi', { // receives a promise - method: "claim_list", - params: { name: claimName } + axios.post('http://localhost:5279/lbryapi', { + "method": "claim_list", + "params": { "name": claimName } }) .then(function (response) { console.log(">> 'claim_list' success"); @@ -128,7 +128,7 @@ module.exports = { var orderedPublicClaims = orderTopClaims(freePublicClaims); // create the uri for the first (selected) claim console.log(">> ordered free public claims"); - var freePublicClaimUri = "lbry://" + orderedPublicClaims[0].name + "#" + orderedPublicClaims[0].claim_id; + var freePublicClaimUri = orderedPublicClaims[0].name + "#" + orderedPublicClaims[0].claim_id; console.log(">> your free public claim URI:", freePublicClaimUri); // fetch the image to display getClaimWithUri(freePublicClaimUri, resolve, reject);