fix(frontend): key as config flag
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
|||||||
"io/fs"
|
"io/fs"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
svgtemplater "tomatentum.net/svg-templater"
|
svgtemplater "tomatentum.net/svg-templater"
|
||||||
@@ -97,7 +96,7 @@ func PrepareFrontend(key string) {
|
|||||||
|
|
||||||
// Execute with environment variables
|
// Execute with environment variables
|
||||||
data := map[string]string{
|
data := map[string]string{
|
||||||
"APIKey": os.Getenv("API_KEY"),
|
"APIKey": key,
|
||||||
"APIUrl": "",
|
"APIUrl": "",
|
||||||
}
|
}
|
||||||
if err := tmpl.Execute(w, data); err != nil {
|
if err := tmpl.Execute(w, data); err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user