File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
modules/module-mongodb-storage/src/storage Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,13 @@ export class MongoReportStorage implements storage.ReportStorageFactory {
1818 }
1919
2020 async reportSdkConnect ( data : SdkConnectDocument ) : Promise < void > {
21- await this . db . sdk_report_events . insertOne ( data ) ;
21+ const res = await this . db . sdk_report_events . insertOne ( data ) ;
22+ console . log ( res ) ;
2223 }
2324 async reportSdkDisconnect ( data : SdkConnectDocument ) : Promise < void > {
2425 const { _id, ...rest } = data ;
25- await this . db . sdk_report_events . findOneAndUpdate ( { _id } , rest , { upsert : true } ) ;
26+ const res = await this . db . sdk_report_events . findOneAndUpdate ( { _id } , rest , { upsert : true } ) ;
27+ console . log ( res ) ;
2628 }
2729 async listCurrentConnections ( data : event_types . PaginatedInstanceRequest ) : Promise < void > {
2830 console . log ( 'MongoReportStorage.listCurrentConnections' , data ) ;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export type SdkDisconnectEventData = {
2626 disconnect_at : Date ;
2727} & SdkUserData ;
2828
29+ // Mongodb document type for SDK connect and disconnect events
2930export type SdkConnectDocument = {
3031 _id : bson . ObjectId ;
3132 sdk : string ;
You can’t perform that action at this time.
0 commit comments