refactor: minor changes to remove mongo deprecation warnings (#7626)
This commit is contained in:
@@ -180,10 +180,10 @@ export class MongoStorageAdapter implements StorageAdapter {
|
|||||||
delete this.connectionPromise;
|
delete this.connectionPromise;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
database.on('error', () => {
|
client.on('error', () => {
|
||||||
delete this.connectionPromise;
|
delete this.connectionPromise;
|
||||||
});
|
});
|
||||||
database.on('close', () => {
|
client.on('close', () => {
|
||||||
delete this.connectionPromise;
|
delete this.connectionPromise;
|
||||||
});
|
});
|
||||||
this.client = client;
|
this.client = client;
|
||||||
@@ -555,7 +555,7 @@ export class MongoStorageAdapter implements StorageAdapter {
|
|||||||
return this._adaptiveCollection(className)
|
return this._adaptiveCollection(className)
|
||||||
.then(collection =>
|
.then(collection =>
|
||||||
collection._mongoCollection.findOneAndUpdate(mongoWhere, mongoUpdate, {
|
collection._mongoCollection.findOneAndUpdate(mongoWhere, mongoUpdate, {
|
||||||
returnOriginal: false,
|
returnDocument: 'after',
|
||||||
session: transactionalSession || undefined,
|
session: transactionalSession || undefined,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user