강의

멘토링

커뮤니티

Inflearn Community Q&A

No author

This post's author information has been deleted.

[Renewed] Node.js Textbook - From Basics to Project Practice

Understanding deserializeUser

deserializeUser findAll()실행시 로그인 성공 후 화면이 그대로입니다.

Resolved

Written on

·

222

0

로그인을 하면 세션까지는 올바르게 잘 넣어집니다.

그런데 deserializeUser를 실행할때 findOne을 findAll로 실행하면 req.user까지만 되고 나머지 user.id user.nick 등이 받아와지지 않습니다. 

findAll 과 findOne에 id를 조건으로 입력하면 같은 결과가 나온다고 생각했는데 왜 안되는지 혹시 알려주실수 있나요 ㅠㅠ

nodejsmysqlmongodbSequelize

Answer 2

0

감사합니다 ㅎㅎ

0

zerocho님의 프로필 이미지
zerocho
Instructor

findOne은 결괏값이 { id: 1, nickname: '제로초' } 이렇게 나오고 findAll은 [{ id: 1, nickname: '제로초' }]로 나옵니다.

No author

This post's author information has been deleted.

Ask a question