fix env var creds load

This commit is contained in:
rmanach 2025-01-02 19:00:45 +01:00
parent 6576f45eac
commit eede129f84

View File

@ -7,6 +7,7 @@ import (
"librapi/handlers/login/templates" "librapi/handlers/login/templates"
"librapi/services" "librapi/services"
"net/http" "net/http"
"os"
"sync" "sync"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
@ -14,11 +15,11 @@ import (
var ( var (
adminUsername = sync.OnceValue[string](func() string { adminUsername = sync.OnceValue[string](func() string {
return "test" return os.Getenv("API_ADMIN_USERNAME")
}) })
adminPassword = sync.OnceValue[string](func() string { adminPassword = sync.OnceValue[string](func() string {
return "test" return os.Getenv("API_ADMIN_PASSWORD")
}) })
) )