From 573f7f87ca7e363d625bdce9fbc88a4d6f93d798 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Mon, 16 Jul 2018 14:57:26 -0700 Subject: [PATCH 1/2] added embed url to api return --- server/controllers/api/claim/publish/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/controllers/api/claim/publish/index.js b/server/controllers/api/claim/publish/index.js index b429e797..7bc188b0 100644 --- a/server/controllers/api/claim/publish/index.js +++ b/server/controllers/api/claim/publish/index.js @@ -75,9 +75,10 @@ const claimPublish = ({ body, files, headers, ip, originalUrl, user, tor }, res) message: 'publish completed successfully', data : { name, - claimId: result.claim_id, - url : `${host}/${result.claim_id}/${name}`, - lbryTx : result, + claimId : result.claim_id, + showUrl : `${host}/${result.claim_id}/${name}`, + embedUrl: `${host}/asset/${name}/${result.claim_id}`, + lbryTx : result, }, }); // record the publish end time and send to google analytics From 93325c3e9887ece0679ae98f5347afcb73d91039 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Tue, 17 Jul 2018 11:07:41 -0700 Subject: [PATCH 2/2] added url property back to response for app backwards compatability --- server/controllers/api/claim/publish/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/controllers/api/claim/publish/index.js b/server/controllers/api/claim/publish/index.js index 7bc188b0..51e6e9be 100644 --- a/server/controllers/api/claim/publish/index.js +++ b/server/controllers/api/claim/publish/index.js @@ -76,7 +76,7 @@ const claimPublish = ({ body, files, headers, ip, originalUrl, user, tor }, res) data : { name, claimId : result.claim_id, - showUrl : `${host}/${result.claim_id}/${name}`, + url : `${host}/${result.claim_id}/${name}`, embedUrl: `${host}/asset/${name}/${result.claim_id}`, lbryTx : result, },