Skip to content

Commit 0657ffe

Browse files
changed document type mongo
1 parent 5ff2da5 commit 0657ffe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/module-mongodb-storage/src/storage/MongoReportStorage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export class MongoReportStorage implements storage.ReportStorageFactory {
2222
await this.db.sdk_report_events.insertOne(data);
2323
}
2424
async reportSdkDisconnect(data: SdkConnectDocument): Promise<void> {
25-
console.log(data);
26-
await this.db.sdk_report_events.findOneAndUpdate({ _id: data._id }, data, { upsert: true });
25+
const { _id, ...rest } = data;
26+
await this.db.sdk_report_events.findOneAndUpdate({ _id }, rest, { upsert: true });
2727
}
2828
async listCurrentConnections(data: event_types.PaginatedInstanceRequest): Promise<void> {
2929
console.log('MongoReportStorage.listCurrentConnections', data);

0 commit comments

Comments
 (0)