Add admin panel: visit counter, product editor, screenshots upload
This commit is contained in:
@@ -11,6 +11,7 @@ type Config struct {
|
||||
AdminEmail string
|
||||
AdminPassword string
|
||||
SessionSecret string
|
||||
UploadDir string
|
||||
}
|
||||
|
||||
func Load() Config {
|
||||
@@ -18,6 +19,11 @@ func Load() Config {
|
||||
AdminEmail: os.Getenv("ADMIN_EMAIL"),
|
||||
AdminPassword: os.Getenv("ADMIN_PASSWORD"),
|
||||
SessionSecret: os.Getenv("SESSION_SECRET"),
|
||||
UploadDir: os.Getenv("UPLOAD_DIR"),
|
||||
}
|
||||
|
||||
if cfg.UploadDir == "" {
|
||||
cfg.UploadDir = "/app/data/uploads"
|
||||
}
|
||||
|
||||
if cfg.SessionSecret == "" {
|
||||
|
||||
Reference in New Issue
Block a user