add get-breadcrumb endpoint

This commit is contained in:
Daniel Goc
2026-03-31 11:40:57 +02:00
parent 8665c566ee
commit fa89723eb6
9 changed files with 179 additions and 38 deletions

View File

@@ -21,10 +21,12 @@ type SettingsResponse struct {
// AppSettings represents app configuration
type AppSettings struct {
Name string `json:"name"`
Environment string `json:"environment"`
BaseURL string `json:"base_url"`
PasswordRegex string `json:"password_regex"`
Name string `json:"name"`
Environment string `json:"environment"`
BaseURL string `json:"base_url"`
PasswordRegex string `json:"password_regex"`
CategoryTreeRootID uint `json:"category_tree_root_id"`
ShopDefaultLanguage uint `json:"shop_default_language"`
// Config config.Config `json:"config"`
}
@@ -65,10 +67,12 @@ func (h *SettingsHandler) GetSettings(cfg *config.Config) fiber.Handler {
return func(c fiber.Ctx) error {
settings := SettingsResponse{
App: AppSettings{
Name: cfg.App.Name,
Environment: cfg.App.Environment,
BaseURL: cfg.App.BaseURL,
PasswordRegex: constdata.PASSWORD_VALIDATION_REGEX,
Name: cfg.App.Name,
Environment: cfg.App.Environment,
BaseURL: cfg.App.BaseURL,
PasswordRegex: constdata.PASSWORD_VALIDATION_REGEX,
CategoryTreeRootID: constdata.CATEGORY_TREE_ROOT_ID,
ShopDefaultLanguage: constdata.SHOP_DEFAULT_LANGUAGE,
// Config: *config.Get(),
},
Server: ServerSettings{