강의

멘토링

커뮤니티

Inflearn Community Q&A

joung5846's profile image
joung5846

asked

[Code Camp] Highly concentrated backend course created at boot camp

userRepositorySpySave 왜 ? 0 이 안나와? 는 보십시오.

Resolved

Written on

·

382

1

 ```typescript

async create({ email, password, mobileNumber }) {
    const user = await this.userRepository.findOne({ where: { email } });
    if (user) throw new ConflictException('이미 등록된 이메일 입니다.');

    return await this.userRepository.save({ email, password, mobileNumber });
  }

일때

findOne({ where: { email } }) {
    const users = this.mydb.filter((el) => el.email === email);
    if (users.length) return { ...users[0] };

    return null;
  }

입니다.

expressjavascriptdockerrest-apitddnodejsNestJS

Answer 1

0

안녕하세요. 정영훈님

해당 문의 사항으로는 어떠한 점이 궁금하신지 파악하기 어렵습니다.
궁금하신 사항을 부가적인 설명과 함께 문의해 주시길 바랍니다. 감사합니다.

joung5846's profile image
joung5846

asked

Ask a question