MCPcopy
hub / github.com/nestjs/nest / update

Method update

sample/06-mongoose/src/cats/cats.service.ts:25–29  ·  view source on GitHub ↗
(id: string, updateCatDto: UpdateCatDto)

Source from the content-addressed store, hash-verified

23 }
24
25 async update(id: string, updateCatDto: UpdateCatDto): Promise<Cat> {
26 return this.catModel
27 .findByIdAndUpdate({ _id: id }, updateCatDto, { new: true })
28 .exec();
29 }
30
31 async delete(id: string): Promise<Cat> {
32 const deletedCat = await this.catModel

Callers 2

Calls 1

execMethod · 0.80

Tested by

no test coverage detected