Function
findAndUpdate
(
query: FilterQuery<PostDocument>,
update: UpdateQuery<PostDocument>,
options: QueryOptions
)
Source from the content-addressed store, hash-verified
| 18 | } |
| 19 | |
| 20 | export function findAndUpdate( |
| 21 | query: FilterQuery<PostDocument>, |
| 22 | update: UpdateQuery<PostDocument>, |
| 23 | options: QueryOptions |
| 24 | ) { |
| 25 | return Post.findOneAndUpdate(query, update, options); |
| 26 | } |
| 27 | |
| 28 | export function deletePost(query: FilterQuery<PostDocument>) { |
| 29 | return Post.deleteOne(query); |
Tested by
no test coverage detected