fix: scope page insights to reporting periods
This commit is contained in:
@@ -258,11 +258,11 @@ func insightScopeQuery(r *http.Request) (string, string, bool) {
|
||||
return terminalID, periodID, len(terminalID) <= 128 && len(periodID) <= 128
|
||||
}
|
||||
|
||||
func (s *Server) insightPeriod(ctx context.Context, module insight.Module, periodID string) (insight.PeriodScope, bool) {
|
||||
func (s *Server) insightPeriod(ctx context.Context, _ insight.Module, periodID string) (insight.PeriodScope, bool) {
|
||||
if periodID == "" {
|
||||
return insight.PeriodScope{}, true
|
||||
}
|
||||
if module != insight.ModuleTransactions || s.analytics == nil {
|
||||
if s.analytics == nil {
|
||||
return insight.PeriodScope{}, false
|
||||
}
|
||||
periods, err := s.analytics.Periods(ctx)
|
||||
|
||||
Reference in New Issue
Block a user