package app import ( "context" "github.com/geo-platform/tenant-api/internal/shared/auth" "github.com/geo-platform/tenant-api/internal/shared/response" ) func requireCurrentBrandID(ctx context.Context) (int64, error) { if brandID, ok := auth.CurrentBrandIDFromCtx(ctx); ok { return brandID, nil } return 0, response.ErrBadRequest(40033, "brand_context_required", "current brand is required") }