File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
modules/module-mongodb-storage/src/storage Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,12 @@ export class MongoReportStorage implements storage.ReportStorageFactory {
1818 }
1919
2020 async reportSdkConnect ( data : SdkConnectDocument ) : Promise < void > {
21+ console . log ( data ) ;
2122 await this . db . sdk_report_events . insertOne ( data ) ;
2223 }
2324 async reportSdkDisconnect ( data : SdkConnectDocument ) : Promise < void > {
24- console . log ( 'MongoReportStorage.reportSdkDisconnect' , data ) ;
25+ console . log ( data ) ;
26+ await this . db . sdk_report_events . findOneAndUpdate ( { _id : data . _id } , data , { upsert : true } ) ;
2527 }
2628 async listCurrentConnections ( data : event_types . PaginatedInstanceRequest ) : Promise < void > {
2729 console . log ( 'MongoReportStorage.listCurrentConnections' , data ) ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export type SdkConnectDocument = {
3737 client_id : string ;
3838 user_id : string ;
3939 jwt_exp ?: Date ;
40- connect_at : Date ;
40+ connect_at ? : Date ;
4141 disconnect_at ?: Date ;
4242} ;
4343
You can’t perform that action at this time.
0 commit comments