From 08010956a81d541d22467ed767164c1d3f695ef2 Mon Sep 17 00:00:00 2001 From: Brian Beck Date: Sun, 26 Sep 2021 00:50:59 -0700 Subject: [PATCH] Default timePeriod to null instead of undefined --- app/api/src/players/players.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/src/players/players.service.ts b/app/api/src/players/players.service.ts index 8f71840..cb355ea 100644 --- a/app/api/src/players/players.service.ts +++ b/app/api/src/players/players.service.ts @@ -56,7 +56,7 @@ export class PlayersService { minGames, minShots, limit, - timePeriod, + timePeriod = null, } = topAccuracyQuery; const shotsStat = { @@ -206,7 +206,7 @@ export class PlayersService { } async findTopWins(topWinsQuery: TopWinsQueryDto) { - const { minGames, limit, timePeriod } = topWinsQuery; + const { minGames, limit, timePeriod = null } = topWinsQuery; const sinceDate = '(now() - (:timePeriod)::interval)';