인프런 커뮤니티 질문&답변
findOne() undefined 이유 아시는분
작성
·
470
0
  async validate(payload) {
    const { username } = payload;
    console.log(username);
    console.log(payload);
    const user: User = await this.userRepository.findOne(username);
    if (!user) {
      throw new UnauthorizedException('error');
    }
    return user;
  }
}log
leejinleejinseong
{ username: 'leejinleejinseong', iat: 1674638178, exp: 1674641778 }
위 로그처럼 데이터는 로그에 찍히는데 왜 findOne에서 undefined 나올까요? 이유 아시는분..2시간 박치기하고있습니다..덜덜;;; 별짓 다해봐도 해결이 안되네요;;
답변
답변을 기다리고 있는 질문이에요
첫번째 답변을 남겨보세요!





