fix env var creds load
This commit is contained in:
parent
6576f45eac
commit
eede129f84
@ -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")
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user