refactor: Replace unused context parameters with blank identifiers and fix variable references

- Replace ctx parameter with _ in provisionTenantContext, provisionDatabaseSchema, provisionStorageResources, configureCarrier, configureRatePlans, setupPaymentProcessing, and validateCompliance methods
- Fix tenant_id scope to use wrappedTx.tenantID instead of r.tenantID in TenantScopedTransaction
- Fix pricing effectiveness analytics to use ratePlanAnalytics.AverageDiscount and ratePlanAnalytics.TotalSavings instead of analytics.
This commit is contained in:
nutcas3
2026-05-03 10:31:49 +03:00
parent 7a80fb9aeb
commit 4205d4c2aa
5 changed files with 10 additions and 25 deletions
@@ -80,7 +80,7 @@ func (r *TenantAwareRepository) TenantScopedTransaction(ctx context.Context, fn
// Since the function expects *gorm.DB, we need to embed the wrapper properly
return fn(wrappedTx.DB.Scopes(func(db *gorm.DB) *gorm.DB {
// Apply tenant filtering to all queries
return db.Where("tenant_id = ?", r.tenantID)
return db.Where("tenant_id = ?", wrappedTx.tenantID)
}))
}
return fn(tx)