fix products listing

This commit is contained in:
2026-03-24 14:39:13 +01:00
parent 3b80fa6dbe
commit 73cc936d56
8 changed files with 22 additions and 108 deletions

View File

@@ -22,6 +22,7 @@ type Config struct {
I18n I18n
Pdf PdfPrinter
GoogleTranslate GoogleTranslateConfig
Image ImageConfig
}
type I18n struct {
@@ -32,6 +33,10 @@ type ServerConfig struct {
Host string `env:"SERVER_HOST,0.0.0.0"`
}
type ImageConfig struct {
ImagePrefix string `env:"IMAGE_PREFIX"`
}
type DatabaseConfig struct {
Host string `env:"DB_HOST,localhost"`
Port int `env:"DB_PORT"`
@@ -167,6 +172,10 @@ func load() *Config {
slog.Error("not possible to load env variables for google translate : ", err.Error(), "")
}
err = loadEnv(&cfg.Image)
if err != nil {
slog.Error("not possible to load env variables for google translate : ", err.Error(), "")
}
return cfg
}