From 897b5bf4ea6eae285b6967ca2a4b22e39f581ab6 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Mon, 23 May 2022 22:49:39 +0200 Subject: [PATCH] Specify whole API base URL in config --- .env.example | 2 +- .env.production | 2 +- .env.test | 2 +- app/services/btc_pay.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 99cc4ad..99df7d4 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ EJABBERD_API_URL='https://xmpp.kosmos.org/api' -BTCPAY_API_URL='http://localhost:23001' +BTCPAY_API_URL='http://localhost:23001/api/v1' LNDHUB_API_URL='http://localhost:3023' LNDHUB_PUBLIC_URL='https://lndhub.kosmos.org' diff --git a/.env.production b/.env.production index 8b61513..228cf57 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,4 @@ EJABBERD_API_URL='https://xmpp.kosmos.org:5443/api' -BTCPAY_API_URL='http://10.1.1.163:23001' +BTCPAY_API_URL='http://10.1.1.163:23001/api/v1' LNDHUB_API_URL='http://10.1.1.163:3023' LNDHUB_PUBLIC_URL='https://lndhub.kosmos.org' diff --git a/.env.test b/.env.test index 64e2fd5..103f43d 100644 --- a/.env.test +++ b/.env.test @@ -1,4 +1,4 @@ EJABBERD_API_URL='http://xmpp.example.com/api' -BTCPAY_API_URL='http://btcpay.example.com' +BTCPAY_API_URL='http://btcpay.example.com/api/v1' LNDHUB_API_URL='http://localhost:3023' LNDHUB_PUBLIC_URL='https://lndhub.kosmos.org' diff --git a/app/services/btc_pay.rb b/app/services/btc_pay.rb index 5abcb4d..becd506 100644 --- a/app/services/btc_pay.rb +++ b/app/services/btc_pay.rb @@ -3,7 +3,7 @@ # class BtcPay def initialize - @base_url = "#{ENV["BTCPAY_API_URL"]}/api/v1" + @base_url = ENV["BTCPAY_API_URL"] @store_id = Rails.application.credentials.btcpay[:store_id] @auth_token = Rails.application.credentials.btcpay[:auth_token] end