From ea438a45c15d5ad93df8a0063b049968b60150ab Mon Sep 17 00:00:00 2001 From: abdou6666 Date: Tue, 31 Dec 2024 14:28:33 +0100 Subject: [PATCH] fix: bot stats to comply with strict null check --- api/src/analytics/schemas/bot-stats.schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/analytics/schemas/bot-stats.schema.ts b/api/src/analytics/schemas/bot-stats.schema.ts index 37a6a44e..a7dadcb2 100644 --- a/api/src/analytics/schemas/bot-stats.schema.ts +++ b/api/src/analytics/schemas/bot-stats.schema.ts @@ -55,7 +55,7 @@ export class BotStats extends BaseSchema { */ @Prop({ type: Number, default: 0 }) - value?: number; + value: number; /** * name of the insight (e.g: incoming messages). @@ -76,7 +76,7 @@ export class BotStats extends BaseSchema { id: index + 1, name: type, values: [], - }; + } as ToLinesType; }); const index: { [dataName: string]: number } = data.reduce(