mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-15 08:25:12 +00:00
refactor: Extract helper methods, fix formatting, and add TODO comments for pending implementations
- Extract generateHistoryAnalytics helper in selection_handler_methods.go - Extract generateRecommendations helper in selection_handler_selection.go - Extract parsePositiveInt helper in rateplan_handlers_analytics.go - Replace hardcoded URL path with action parameter in ES2Service.sendActivationRequest - Add TODO comments for wrapCurrencyService and updateCarrierWeights pending implementations - Fix struct field alignment and formatting in carrier_methods.go
This commit is contained in:
@@ -3,7 +3,6 @@ package handlers
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
// GetSelectionHistory handles the selection history endpoint
|
||||
@@ -24,10 +23,7 @@ func (h *SelectionHandler) GetSelectionHistory(w http.ResponseWriter, r *http.Re
|
||||
history := h.manager.GetSelectionHistory(carrierID)
|
||||
|
||||
// Generate analytics
|
||||
analytics := map[string]any{
|
||||
"total_selections": len(history),
|
||||
"generated_at": time.Now().Format(time.RFC3339),
|
||||
}
|
||||
analytics := h.generateHistoryAnalytics(history)
|
||||
|
||||
response := SelectionHistoryResponse{
|
||||
Success: true,
|
||||
|
||||
Reference in New Issue
Block a user