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 {
18
18
}
19
19
20
20
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 ) ;
22
23
}
23
24
async reportSdkDisconnect ( data : SdkConnectDocument ) : Promise < void > {
24
25
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 ) ;
26
28
}
27
29
async listCurrentConnections ( data : event_types . PaginatedInstanceRequest ) : Promise < void > {
28
30
console . log ( 'MongoReportStorage.listCurrentConnections' , data ) ;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export type SdkDisconnectEventData = {
26
26
disconnect_at : Date ;
27
27
} & SdkUserData ;
28
28
29
+ // Mongodb document type for SDK connect and disconnect events
29
30
export type SdkConnectDocument = {
30
31
_id : bson . ObjectId ;
31
32
sdk : string ;
You can’t perform that action at this time.
0 commit comments