Skip to content

Conversation

@hyeeon
Copy link
Collaborator

@hyeeon hyeeon commented Nov 27, 2025

๐Ÿš€ ์ž‘์—…ํ•œ ๊ธฐ๋Šฅ ์„ค๋ช… (Feature Description)

  • 8์ฃผ์ฐจ ํ”ผ๋“œ๋ฐฑ ๋ฐ˜์˜
  • ํ•˜๋“œ ์ฝ”๋”ฉ ์‚ญ์ œ
  • JWT ๊ตฌํ˜„ ๋ฐ ์ ์šฉ
  • ํšŒ์› ์ •๋ณด ์ˆ˜์ • API

๐Ÿ” ์ž‘์—… ์ƒ์„ธ (Implementation Details)

  • ๊ตฌ๊ธ€ ์†Œ์…œ ๋กœ๊ทธ์ธ ๊ตฌํ˜„
  • ํšŒ์› ์ •๋ณด ์ˆ˜์ • API ์ƒ์„ฑ
  • ๊ธฐ์กด ํ•˜๋“œ์ฝ”๋”ฉ๋œ userId ๋กœ์ง ์ œ๊ฑฐ
  • ์ธ์ฆ์ด ํ•„์š”ํ•œ API์— JWT ์ธ์ฆ ์ ์šฉ

๐Ÿ–ผ๏ธ ์ด๋ฏธ์ง€ ์ฒจ๋ถ€ (Images)

  • image

๐Ÿ“‹ ๊ด€๋ จ ์ž๋ฃŒ (Related Resources)

  • ๊ธฐ๋Šฅ ๊ตฌํ˜„์— ์ฐธ๊ณ ํ•œ ์ž๋ฃŒ(๋งํฌ, ๋ฌธ์„œ ๋“ฑ)๊ฐ€ ์žˆ๋‹ค๋ฉด ์—ฌ๊ธฐ์— ์ฒจ๋ถ€ํ•ด์ฃผ์„ธ์š”.

๐Ÿ“ ์ถ”๊ฐ€ ์ •๋ณด (Additional Information)

  • ๊ธฐ๋Šฅ๊ณผ ๊ด€๋ จํ•˜์—ฌ ์ถ”๊ฐ€์ ์œผ๋กœ ๊ณ ๋ คํ•ด์•ผ ํ•  ์‚ฌํ•ญ์ด๋‚˜ ํŠน๋ณ„ํ•œ ์š”๊ตฌ์‚ฌํ•ญ์ด ์žˆ๋‹ค๋ฉด ์—ฌ๊ธฐ์— ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.

Copy link
Collaborator

@jeongkyueun jeongkyueun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ธฐ์กด API์— JWT๋ฅผ ๋ฐ˜์˜ํ•˜์‹œ๊ณ  ๊ตฌ๊ธ€ ์†Œ์…œ ๋กœ๊ทธ์ธ ๊ตฌํ˜„ ์ž˜ ํ•˜์‹  ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค ์ˆ˜๊ณ  ๋งŽ์œผ์…จ์Šต๋‹ˆ๋‹ค!!!

Copy link
Collaborator

@soyun0318 soyun0318 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ˆ˜์ • ์‚ฌํ•ญ์— ๋งž์ถฐ swagger๊นŒ์ง€ ์ž˜ ์ˆ˜์ •ํ•˜์‹  ๊ฒƒ ๊ฐ™์•„์š”

Copy link
Collaborator

@KateteDeveloper KateteDeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์„œ๋น„์Šค๊นŒ์ง€ api์— ๋งž์ถฐ์„œ ์ˆ˜์ •ํ•ด์ฃผ์…จ์Šต๋‹ˆ๋‹ค! ๋„ˆ๋ฌด ์ˆ˜๊ณ  ๋งŽ์œผ์…จ์Šต๋‹ˆ๋‹ค:)

Copy link
Collaborator

@ywkim1m ywkim1m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ตฌ๊ธ€ ๋กœ๊ทธ์ธ ๊ตฌํ˜„ ์ž˜ํ•ด์ฃผ์‹  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค!!

Copy link
Collaborator

@suyeon0421 suyeon0421 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ฏธ์…˜ ๊น”๋”ํ•˜๊ฒŒ ์ž‘์„ฑ ๋„ˆ๋ฌด ์ž˜ํ•˜์‹  ๊ฒƒ ๊ฐ™์•„์š”~~!!! ์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค!!

Copy link
Contributor

@Hminkyung Hminkyung left a 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) => {
Copy link
Contributor

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๊ฐ€ ๋œน๋‹ˆ๋‹ค!

Copy link
Contributor

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);
Copy link
Contributor

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: "์ถ”ํ›„ ์ˆ˜์ •",
Copy link
Contributor

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๊ฐ€ ๋™์ผํ•ด์•ผ ํ•˜๋‹ˆ๊นŒ ์–ด๋–ค ๊ฐ’์œผ๋กœ ๊ด€๋ฆฌํ• ์ง€ ๊ณ ๋ฏผํ•ด๋ณผ์ˆ˜ ์žˆ๊ฒ ์ฃ !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants