Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c3f66f6

Browse files
committedMar 4, 2025·
Use result.*Count to enable newer mongodb driver versions.
1 parent d61efdd commit c3f66f6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Fixed
66
- Return passed `record` instead of resulting record from mongodb calls to
77
enable using newer mongodb driver.
8+
- Use `result.deletedCount` to enable newer mongodb driver.
89

910
## 25.0.0 - 2024-10-15
1011

‎lib/profileAgents.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ export async function remove({id, account} = {}) {
393393
}
394394
const collection = getCollection('profile-profileAgent');
395395
const result = await collection.deleteOne(query);
396-
if(result.result.n === 0) {
396+
if(result.deletedCount === 0) {
397397
const details = {
398398
id,
399399
httpStatusCode: 404,

0 commit comments

Comments
 (0)