강의

멘토링

커뮤니티

Inflearn Community Q&A

god312252262's profile image
god312252262

asked

Do it! Introduction to Node.js Programming

Writing CRUD code

updateContact 함수관련 문의

Written on

·

216

0

updateContact 함수에서 findByIdAndUpdate 을 사용하지 않고 아이디를 가져와서 save 함수를 사용한 이유가 있나요?

 

javascriptnode.jsmongodbexpress

Answer 1

0

findByIdAndUpdate 를 사용해도 됩니다. 강의에서는 여러 방법을 설명하기 위해 findById를 사용해서 찾은 후 수정하고 저장하는 방법을 설명했습니다.

god312252262's profile image
god312252262

asked

Ask a question