From 0d2e37fd132157ed5a99b5b1ad2bbddf2290b486 Mon Sep 17 00:00:00 2001 From: Nilo Roberto C Paim Date: Tue, 24 Oct 2023 18:23:16 -0300 Subject: [PATCH] fix: get release type from config file --- config.json | 2 +- database/database.go | 4 ++-- globals/globals.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config.json b/config.json index f4c6330..1383222 100644 --- a/config.json +++ b/config.json @@ -16,7 +16,7 @@ "releasetype": "homolog", "data": { "API_PORT": 8112, - "DB_HOST": "localhost", + "DB_HOST": "177.153.50.98", "DB_DRIVER": "postgres", "DB_USER": "pcasth", "DB_PASSWORD": "@407Smc837", diff --git a/database/database.go b/database/database.go index c90d303..1531210 100644 --- a/database/database.go +++ b/database/database.go @@ -7,7 +7,7 @@ import ( "api/utils" "fmt" "log" - "os" + "strings" "github.com/joho/godotenv" @@ -29,7 +29,7 @@ func ConnectDB() error { return erre } - globals.API_RELEASE = os.Getenv("API_RELEASE") + globals.API_RELEASE = strings.ToUpper(config.Configurations.ReleaseType) driver := config.Configurations.Data.DB_DRIVER user := config.Configurations.Data.DB_USER diff --git a/globals/globals.go b/globals/globals.go index 6eece97..b0888fc 100644 --- a/globals/globals.go +++ b/globals/globals.go @@ -1,6 +1,6 @@ package globals var ( - API_VERSION = "1.0.21" + API_VERSION = "1.1.0" API_RELEASE = "" )