-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/mission 09/ํ #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ํ/main
Are you sure you want to change the base?
The head ref may contain hidden characters: "feature/mission-09/\uD604"
Conversation
jeongkyueun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ธฐ์กด API์ JWT๋ฅผ ๋ฐ์ํ์๊ณ ๊ตฌ๊ธ ์์ ๋ก๊ทธ์ธ ๊ตฌํ ์ ํ์ ๊ฑฐ ๊ฐ์ต๋๋ค ์๊ณ ๋ง์ผ์ จ์ต๋๋ค!!!
soyun0318
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์์ ์ฌํญ์ ๋ง์ถฐ swagger๊น์ง ์ ์์ ํ์ ๊ฒ ๊ฐ์์
KateteDeveloper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๋น์ค๊น์ง api์ ๋ง์ถฐ์ ์์ ํด์ฃผ์ จ์ต๋๋ค! ๋๋ฌด ์๊ณ ๋ง์ผ์ จ์ต๋๋ค:)
ywkim1m
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ตฌ๊ธ ๋ก๊ทธ์ธ ๊ตฌํ ์ํด์ฃผ์ ๊ฒ ๊ฐ์ต๋๋ค! ์๊ณ ํ์ จ์ต๋๋ค!!
suyeon0421
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ฏธ์ ๊น๋ํ๊ฒ ์์ฑ ๋๋ฌด ์ํ์ ๊ฒ ๊ฐ์์~~!!! ์๊ณ ํ์ จ์ต๋๋ค!!
Hminkyung
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9์ฃผ์ฐจ ๋ฏธ์ ๊น๋ํ๊ฒ ์ ๋ฆฌ ์ํด์ฃผ์ ๊ฒ ๊ฐ์์!! ์ํํ๋๋ผ ๋๋ฌด๋๋ฌด ๊ณ ์๋ง์ผ์ จ์ด์!! ใ ใ ์ด์ ๋ฐฐํฌํด๋ณด๋ฉด์ ํ์ฃผ๋ง ๋ํ๋ฉด ๋์ด๋๊น ๋ง์ง๋ง๊น์ง ํ์ดํ ํด๋ด ์๋ค!! ๊ณ ์ํ์ จ์ด์~
| }; | ||
|
|
||
| // ๋ด ๋ฆฌ๋ทฐ ์กฐํ | ||
| export const handleListMyReviews = async (req, res, next) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index.js์์ ๋ผ์ฐํฐ ์ฒ๋ฆฌํ๊ณ ๋ด ๋ฆฌ๋ทฐ ์กฐํ๋ JWT๋ฅผ ์ฌ์ฉํ๊ณ ์์ด์! ๋ฐ๋ผ์ ์ฌ๊ธฐ์๋ userId๋ฅผ ์ฟผ๋ฆฌ๋ก ๋ฐ์ ํ์ ์์ด์! JWT๋ฅผ ์ ์ฉํ๊ธฐ ๋๋ฌธ์ ํ์ฌ ๋ก๊ทธ์ธํ ๋ด ๋ฆฌ๋ทฐ๊ฐ ๋์ด์๋ ์ํฉ์ด๋ผ์ userId ์ฟผ๋ฆฌ๋ ํ์์์ด์!
- ์ถ๊ฐ์ ์ผ๋ก ValidationError๊ฐ import ๋์ด์์ง ์์์!! import ๊ฐ ๋์ด์์ง ์์ผ๋ฉด not defined error๊ฐ ๋น๋๋ค!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฟผ๋ฆฌ์์ userId ๋ฅผ ๋ฐ์ง ์๊ณ JWT payload์์ ๊ฐ์ ธ์ค๋ ํ์์ผ๋ก ์งํํ๋ฉด ์ข๊ณ Swagger ์ฃผ์๋ ๋ง์ฐฌ๊ฐ์ง๋ก userId ์ฟผ๋ฆฌ ํ๋ผ๋ฏธํฐ ์ค๋ช ์ ์ ๊ฑฐํด๋ ๋ฉ๋๋ค!
| } | ||
| */ | ||
| try { | ||
| const userId = Number(req.params.userId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isLogin์ผ๋ก JWT ์ธ์ฆ์ ๊ฑธ๋ ค์์ง๋ง ์ค์ ์กฐํ ๋์์ด :userId path ํ๋ผ๋ฏธํฐ ํ์์ผ๋ก ๋์ด์์ด์ ! ๋ก๊ทธ์ธํ ์ ์ ๊ฐ path userId๊ฐ ์๋๋๋ผ๋ ์์ฒญ์ด ํต๊ณผ๋๊ณ ์๋๋ฐ ์ฆ, ๋ด๊ฐ ๋ก๊ทธ์ธ๋ง ๋์ด์๋ค๋ฉด ๋ค๋ฅธ ์ ์ ์ ๋ฏธ์ ๋ชฉ๋ก๋ ์กฐํ๊ฐ ๊ฐ๋ฅํ๋ค ๋ผ๋ ์๋ฏธ๊ฐ ๋์ด๋ฒ๋ฆฝ๋๋ค! ๋ฐ๋ผ์ ๋ด ๋ฏธ์ ๋ชฉ๋ก ์กฐํ๋๊น const userId = req.user.ud ์์ผ๋ก ์งํ์ด ๋์ด์ผ ํฉ๋๋ค.
| name: profile.displayName, | ||
| gender: null, | ||
| birth: new Date(1970, 0, 1), | ||
| address: "์ถํ ์์ ", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ถํ ์์ ์ด๋ผ๋ ๊ฐ์ด DB์ ๋จ๋ ๊ฒ๋ณด๋ค๋ ๋น ๋ฌธ์์ด ํน์ ๊ฐ๊ฐ์ ์ด๋ค ์์ผ๋ก ๋ค์ด๊ฐ ์ง ๊ณ ๋ คํด์ ๋ฃ๋๊ฒ๋ ์ข์ ๊ฒ ๊ฐ์์!
์๋ฅผ ๋ค์ด์ gender์ ๊ฒฝ์ฐ๋ ๋จ์ null ๋ณด๋ค๋ userSignUp๊ณผ upadateMyProfile ์ชฝ๊ณผ gender๊ฐ ๋์ผํด์ผ ํ๋๊น ์ด๋ค ๊ฐ์ผ๋ก ๊ด๋ฆฌํ ์ง ๊ณ ๋ฏผํด๋ณผ์ ์๊ฒ ์ฃ !
๐ ์์ ํ ๊ธฐ๋ฅ ์ค๋ช (Feature Description)
๐ ์์ ์์ธ (Implementation Details)
๐ผ๏ธ ์ด๋ฏธ์ง ์ฒจ๋ถ (Images)
๐ ๊ด๋ จ ์๋ฃ (Related Resources)
๐ ์ถ๊ฐ ์ ๋ณด (Additional Information)