MCPcopy Index your code
hub / github.com/TomDoesTech/REST-API-Tutorial / findAndUpdate

Function findAndUpdate

src/service/post.service.ts:20–26  ·  view source on GitHub ↗
(
  query: FilterQuery<PostDocument>,
  update: UpdateQuery<PostDocument>,
  options: QueryOptions
)

Source from the content-addressed store, hash-verified

18}
19
20export function findAndUpdate(
21 query: FilterQuery<PostDocument>,
22 update: UpdateQuery<PostDocument>,
23 options: QueryOptions
24) {
25 return Post.findOneAndUpdate(query, update, options);
26}
27
28export function deletePost(query: FilterQuery<PostDocument>) {
29 return Post.deleteOne(query);

Callers 1

updatePostHandlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected