Merge pull request #492 from Hexastack/fix/bot-stats-ts-check
Some checks are pending
Build and Push Docker API Image / build-and-push (push) Waiting to run
Build and Push Docker Base Image / build-and-push (push) Waiting to run
Build and Push Docker NLU Image / build-and-push (push) Waiting to run
Build and Push Docker UI Image / build-and-push (push) Waiting to run

fix: bot stats to comply with strict null check
This commit is contained in:
Med Marrouchi 2025-01-02 08:55:47 +01:00 committed by GitHub
commit 7d8dccdd9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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(