From 3e4c85f116ebdc1863d1b719cb8b22390eda5af1 Mon Sep 17 00:00:00 2001 From: Mike de Geofroy Date: Wed, 16 Oct 2024 01:32:36 +0300 Subject: [PATCH] maybe this can fix the error --- src/stats/stats.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stats/stats.service.ts b/src/stats/stats.service.ts index d6a277e..c93c64a 100644 --- a/src/stats/stats.service.ts +++ b/src/stats/stats.service.ts @@ -19,9 +19,10 @@ export class StatsService { }); const savedStat = await this.statsRepository.save(newStat); + const newStats = await this.findLatest(); this.pubSubService .getPubSub() - .publish('statCreated', { statCreated: savedStat }); + .publish('statCreated', { statCreated: newStats }); return savedStat; }