Add admin panel: visit counter, product editor, screenshots upload

This commit is contained in:
shop
2026-06-25 16:59:21 +03:00
parent 6322aee714
commit 08727a1995
21 changed files with 1209 additions and 67 deletions
+6
View File
@@ -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 == "" {