노마드코더 유튜브 클론코딩 #8.14 Bugfix 공부내용 정리 비디오 업로드시 유저비밀번호를 해시하던 현상 수정 유저가 비밀번호 변경시에만 해시되도록 수정 == isModified("password") userSchema.pre("save", async function () { if (this.isModified("password")) { this.password = await bcrypt.hash(this.password, 5); } }) 비디오 수정,삭제시 비디오 소유권자만 작업할 수 있도록 기능추가 story.owner의 타입은 object이고 _id의 타입은 String이므로 ' !== ' 연산자로 비교가 불가능하기 때문에 String으로 형변환을 해줘야한다. const { user: { _id..