-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: upgrade mongoose version to 7 #4106
Changes from 1 commit
0b97166
2e875d1
dbdf573
32eb4c1
31585a4
064821a
81e8a88
00781fc
c66f099
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,8 +40,8 @@ | |
"googleapis": "^60.0.1", | ||
"intercom-client": "^2.11.0", | ||
"jsonfile": "^6.0.1", | ||
"mongoose": "6.11.3", | ||
"mongoose-delete": "^0.5.4", | ||
"mongoose": "^7.5.0", | ||
"mongoose-delete": "^1.0.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Matching a supporting version for the delete package |
||
"ng-intercom": "^8.0.2", | ||
"reflect-metadata": "^0.1.13", | ||
"rimraf": "^3.0.2", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,8 +58,13 @@ export class BaseRepository<T_DBModel, T_MappedEntity, T_Enforcement = object> { | |
return this.mapEntity(data.toObject()); | ||
} | ||
|
||
async delete(query: FilterQuery<T_DBModel> & T_Enforcement): Promise<void> { | ||
return await this.MongooseModel.remove(query); | ||
async delete(query: FilterQuery<T_DBModel> & T_Enforcement): Promise<{ | ||
/** Indicates whether this writes result was acknowledged. If not, then all other members of this result will be undefined. */ | ||
acknowledged: boolean; | ||
/** The number of documents that were deleted */ | ||
deletedCount: number; | ||
Comment on lines
+62
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Had to do that, since the type is not exported from mongoose |
||
}> { | ||
return await this.MongooseModel.deleteMany(query); | ||
} | ||
|
||
async find( | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To respect the current response interface of
void