From 3abe5fc9c855f52f156a0a3f0a1169920d93340f Mon Sep 17 00:00:00 2001 From: lash Date: Mon, 13 Jan 2025 08:44:15 +0000 Subject: [PATCH] Add api config --- config/config.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 8abaead..31d02b6 100644 --- a/config/config.go +++ b/config/config.go @@ -2,6 +2,7 @@ package config import ( viseconfig "git.grassecon.net/grassrootseconomics/visedriver/config" + apiconfig "git.grassecon.net/grassrootseconomics/sarafu-api/config" "git.grassecon.net/grassrootseconomics/visedriver/env" ) @@ -20,7 +21,10 @@ func LoadConfig() error { if err != nil { return err } - + err = apiconfig.LoadConfig() + if err != nil { + return err + } JetstreamURL = env.GetEnv("NATS_JETSTREAM_URL", defaultJetstreamURL) JetstreamClientName = env.GetEnv("NATS_JETSTREAM_CLIENT_NAME", defaultJetstreamClientName) return nil @@ -29,3 +33,7 @@ func LoadConfig() error { func DbConn() string { return viseconfig.DbConn } + +func Language() string { + return viseconfig.DefaultLanguage +}