fix: get release type from config file

main
Nilo Roberto C Paim 2023-10-24 18:23:16 -03:00
parent 055c274634
commit 0d2e37fd13
3 changed files with 4 additions and 4 deletions

View File

@ -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",

View File

@ -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

View File

@ -1,6 +1,6 @@
package globals
var (
API_VERSION = "1.0.21"
API_VERSION = "1.1.0"
API_RELEASE = ""
)