fix: unify tenant context keys and load tenant_id from JWT

This commit is contained in:
Erik Silva
2025-12-09 02:42:43 -03:00
parent 00d0793dab
commit 331d50e677
3 changed files with 10 additions and 11 deletions

View File

@@ -9,10 +9,7 @@ import (
"aggios-app/backend/internal/repository"
)
type tenantContextKey string
const TenantIDKey tenantContextKey = "tenantID"
const SubdomainKey tenantContextKey = "subdomain"
const SubdomainKey contextKey = "subdomain"
// TenantDetector detects tenant from subdomain
func TenantDetector(tenantRepo *repository.TenantRepository) func(http.Handler) http.Handler {