From 7d111086c2a24b2bdcd0d8c890af1388228e0e78 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 1 Jul 2019 21:09:50 +0300 Subject: [PATCH] remove port in docs --- .../lib/block_scout_web/templates/api_docs/eth_rpc.html.eex | 2 +- .../lib/block_scout_web/templates/api_docs/index.html.eex | 2 +- apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/api_docs/eth_rpc.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/api_docs/eth_rpc.html.eex index 37b9ecdaa2..ba6be00103 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/api_docs/eth_rpc.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/api_docs/eth_rpc.html.eex @@ -2,7 +2,7 @@

<%= gettext("ETH RPC API Documentation") %>

-

[ <%= gettext "Base URL:" %> <%= url() %>/api/eth_rpc ]

+

[ <%= gettext "Base URL:" %> <%= blockscout_url() %>/api/eth_rpc ]

<%= gettext "This API is provided to support some rpc methods in the exact format specified for ethereum nodes, which can be found " %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex index 5244458bb6..163697d324 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex @@ -2,7 +2,7 @@

<%= gettext("API Documentation") %>

-

[ <%= gettext "Base URL:" %> <%= url() %>/api ]

+

[ <%= gettext "Base URL:" %> <%= blockscout_url() %>/api ]

<%= gettext "This API is provided for developers transitioning their applications from Etherscan to BlockScout. It supports GET and POST requests." %>

diff --git a/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex b/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex index 267099fa2b..f9c280925a 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/api_docs_view.ex @@ -34,7 +34,7 @@ defmodule BlockScoutWeb.APIDocsView do end) end - defp url do + def blockscout_url do if System.get_env("BLOCKSCOUT_HOST") do "http://" <> System.get_env("BLOCKSCOUT_HOST") else