From 02eb01ecb500c8fa9102e996bd675da6aca3d3bc Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 10 Sep 2019 14:31:40 +0300 Subject: [PATCH] fix try it out section --- apps/block_scout_web/assets/js/lib/try_api.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/block_scout_web/assets/js/lib/try_api.js b/apps/block_scout_web/assets/js/lib/try_api.js index 6c33779f30..e6460f6c6b 100644 --- a/apps/block_scout_web/assets/js/lib/try_api.js +++ b/apps/block_scout_web/assets/js/lib/try_api.js @@ -55,10 +55,6 @@ function handleSuccess (query, xhr, clickedButton) { clickedButton.prop('disabled', false) } -function dropDomain (url) { - return new URL(url).pathname -} - // Show 'Try it out' UI for a module/action. $('button[data-selector*="btn-try-api"]').click(event => { const clickedButton = $(event.target) @@ -128,7 +124,7 @@ $('button[data-try-api-ui-button-type="execute"]').click(event => { } $.ajax({ - url: dropDomain(composeRequestUrl(query)), + url: composeRequestUrl(query), success: (_data, _status, xhr) => { handleSuccess(query, xhr, clickedButton) },