fix top menu embeding struct

This commit is contained in:
2026-03-26 18:39:13 +01:00
parent 396e25b750
commit 9336cdfa28
9 changed files with 203 additions and 171 deletions

View File

@@ -24,6 +24,7 @@ type Config struct {
GoogleTranslate GoogleTranslateConfig
Image ImageConfig
Cors CorsConfig
MailiSearch MeiliSearchConfig
}
type I18n struct {
@@ -38,6 +39,11 @@ type CorsConfig struct {
Origins []string `env:"CORS_ORGIN"`
}
type MeiliSearchConfig struct {
ServerURL string `env:"MEILISEARCH_URL"`
ApiKey string `env:"MEILISEARCH_API_KEY"`
}
type ImageConfig struct {
ImagePrefix string `env:"IMAGE_PREFIX"`
}
@@ -186,6 +192,12 @@ func load() *Config {
if err != nil {
slog.Error("not possible to load env variables for google translate : ", err.Error(), "")
}
err = loadEnv(&cfg.MailiSearch)
if err != nil {
slog.Error("not possible to load env variables for google translate : ", err.Error(), "")
}
return cfg
}