diff --git a/Sources/App/Controllers/StatsController.swift b/Sources/App/Controllers/StatsController.swift index 96a0a91..fec91f7 100644 --- a/Sources/App/Controllers/StatsController.swift +++ b/Sources/App/Controllers/StatsController.swift @@ -50,7 +50,7 @@ struct StatsController: RouteCollection { } else { - return [totals[0] + 1, totals[1] + 1] + return [totals[0], totals[1] + 1] } } // for match in matches { @@ -117,7 +117,7 @@ struct StatsController: RouteCollection { let startTime = Date() -print ("c \(Date().timeIntervalSince(startTime))") +//print ("c \(Date().timeIntervalSince(startTime))") let daysPlayed = getDaysPlayed(matches: matches) // print ("c \(Date().timeIntervalSince(startTime))") @@ -179,7 +179,7 @@ print ("c \(Date().timeIntervalSince(startTime))") // print ("cc \(Date().timeIntervalSince(startTime))") // // } - print ("c \(Date().timeIntervalSince(startTime))") + // print ("c \(Date().timeIntervalSince(startTime))") return cumulativeRatios @@ -197,8 +197,6 @@ print ("c \(Date().timeIntervalSince(startTime))") //let stats = getStatsByMonth(year: date.year, month: date.month, req: req) //returns eventloopfuture previousMonths.append(CODDate(month: date.month, year: date.year, day: 15, hour:6, minute: 0)) date = Calendar.current.date(byAdding: .month, value: 1, to: date)! - print (date.month) - print ((Date().month % 12) + 1) } while ( date < Calendar.current.date(byAdding: .month, value: 1, to: Date())!) // print (date - Date().timeIntervalSince(startTime))