From 04a01763671398ccd4a3789a321f38a98acd390f Mon Sep 17 00:00:00 2001 From: Michael Simard Date: Wed, 9 Dec 2020 15:12:16 -0600 Subject: [PATCH] bug fixes --- Sources/App/Controllers/StatsController.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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))