use a single bearer token

This commit is contained in:
Alfred Kamanda 2024-11-15 18:35:49 +03:00
parent d3fae34290
commit 51bf2534b8
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703
2 changed files with 5 additions and 8 deletions

View File

@ -16,6 +16,5 @@ DB_TIMEZONE=Africa/Nairobi
#External API Calls #External API Calls
CUSTODIAL_URL_BASE=http://localhost:5003 CUSTODIAL_URL_BASE=http://localhost:5003
CUSTODIAL_BEARER_TOKEN=eyJeSIsInRcCI6IkpXVCJ.yJwdWJsaWNLZXkiOiIwrrrrrr BEARER_TOKEN=eyJeSIsInRcCI6IkpXVCJ.yJwdWJsaWNLZXkiOiIwrrrrrr
DATA_URL_BASE=http://localhost:5006 DATA_URL_BASE=http://localhost:5006
DATA_BEARER_TOKEN=eyJeSIsIRcCI6IXVCJ.yJwdWJsaLZXkiOiIwrrrrrr

View File

@ -20,8 +20,7 @@ const (
var ( var (
custodialURLBase string custodialURLBase string
dataURLBase string dataURLBase string
CustodialBearerToken string BearerToken string
DataBearerToken string
) )
var ( var (
@ -40,8 +39,7 @@ func setBase() error {
custodialURLBase = initializers.GetEnv("CUSTODIAL_URL_BASE", "http://localhost:5003") custodialURLBase = initializers.GetEnv("CUSTODIAL_URL_BASE", "http://localhost:5003")
dataURLBase = initializers.GetEnv("DATA_URL_BASE", "http://localhost:5006") dataURLBase = initializers.GetEnv("DATA_URL_BASE", "http://localhost:5006")
CustodialBearerToken = initializers.GetEnv("CUSTODIAL_BEARER_TOKEN", "") BearerToken = initializers.GetEnv("BEARER_TOKEN", "")
DataBearerToken = initializers.GetEnv("DATA_BEARER_TOKEN", "")
_, err = url.JoinPath(custodialURLBase, "/foo") _, err = url.JoinPath(custodialURLBase, "/foo")
if err != nil { if err != nil {