cleanup
CI / Frontend (push) Successful in 11m7s
CI / Go - apps/auth-service (push) Failing after 8s
CI / Go - apps/backend (push) Failing after 2s
CI / Docker publish - auth-service (push) Has been skipped
CI / Docker publish - backend (push) Has been skipped

This commit is contained in:
Tomas Dvorak
2026-05-05 09:48:15 +02:00
parent 48c3e15a38
commit cf3315e8fc
155 changed files with 70334 additions and 19015 deletions
+3 -12
View File
@@ -5,6 +5,8 @@ import (
"fmt"
"os"
"strings"
"bookra/apps/backend/internal/shared"
)
type Config struct {
@@ -112,7 +114,7 @@ func (cfg Config) PaddleWebhookConfigured() bool {
}
func (cfg Config) PaddleCheckoutConfigured(planCode string) bool {
planCode = normalizePlanCode(planCode)
planCode = shared.NormalizePlanCode(planCode)
return cfg.PaddleConfigured() && cfg.PaddleWebhookConfigured() && cfg.PaddlePriceMatrix[planCode]["czk"] != "" && cfg.PaddlePriceMatrix[planCode]["usd"] != ""
}
@@ -139,17 +141,6 @@ func normalizePaddleEnvironment(value string) string {
}
}
func normalizePlanCode(planCode string) string {
switch strings.TrimSpace(planCode) {
case "growth":
return "pro"
case "multi-location":
return "business"
default:
return strings.TrimSpace(planCode)
}
}
func valueOrDefault(key string, fallback string) string {
if value := strings.TrimSpace(os.Getenv(key)); value != "" {
return value