Skip to content
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

๐Ÿš€ 3๋‹จ๊ณ„ - ์ฆ๊ฒจ์ฐพ๊ธฐ ๊ธฐ๋Šฅ ๊ตฌํ˜„ #248

Open
wants to merge 7 commits into
base: mintheon
Choose a base branch
from

Conversation

mintheon
Copy link

@mintheon mintheon commented Mar 6, 2022

๋งˆ์ง€๋ง‰ ๊ธฐ๋Šฅ ๊ตฌํ˜„์€ ์ƒ๊ฐ๋ณด๋‹ค ์–ด๋ ต์ง€ ์•Š์•˜๋„ค์š”..! ๋งŽ์ด ๋Šฆ์—ˆ์ง€๋งŒ ๋งˆ์ง€๋ง‰๊นŒ์ง€ ๋‹ฌ๋ ค๊ฐ€๊ฒ ์Šต๋‹ˆ๋‹ค.


์š”๊ตฌ์‚ฌํ•ญ

  • ์ฆ๊ฒจ ์ฐพ๊ธฐ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜๊ธฐ
  • ๋กœ๊ทธ์ธ์ด ํ•„์š”ํ•œ API ์š”์ฒญ ์‹œ ์œ ํšจํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ 401 ์‘๋‹ต ๋‚ด๋ ค์ฃผ๊ธฐ

mintheon added 7 commits March 1, 2022 02:28
- ์ฆ๊ฒจ์ฐพ๊ธฐ ๋“ฑ๋ก ๊ธฐ๋Šฅ ์ถ”๊ฐ€
- ๊ธฐ์กด ์ธ์ˆ˜ํ…Œ์ŠคํŠธ์—์„œ token์„ ๋ณด๋‚ด์ง€ ์•Š๋˜ ๋ถ€๋ถ„ ์ˆ˜์ •
- ์ฆ๊ฒจ์ฐพ๊ธฐ ์ƒ์„ฑ ๋ฉ”์„œ๋“œ ๋ถ„๋ฆฌ
- ์ฆ๊ฒจ์ฐพ๊ธฐ ์กฐํšŒ ๊ธฐ๋Šฅ ์ถ”๊ฐ€
- ๋‹ค๋ฅธ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ์— token ๋„ฃ์„ ์ˆ˜ ์žˆ๋„๋ก auth ์ถ”๊ฐ€
- ์ธ์ˆ˜ ํ…Œ์ŠคํŠธ ์—ฌ๋Ÿฌ ๊ฒฝ์šฐ ํ™•์ธ ์œ„ํ•ด ์กฐํšŒ์‹œ ์ฆ๊ฒจ์ฐพ๊ธฐ ๋‘๊ฐœ ๋“ฑ๋กํ•˜๋„๋ก ๋ณ€๊ฒฝ
Copy link

@parkeeseul parkeeseul left a comment

Choose a reason for hiding this comment

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

๋ฆฌ๋ทฐ๊ฐ€ ๋งŽ์ด ๋Šฆ์—ˆ๋„ค์š”! ๐Ÿ™
๋ช‡ ๊ฐ€์ง€ ์†Œ์†Œํ•œ ์ฝ”๋ฉ˜ํŠธ ๋‚จ๊ฒจ๋‘์—ˆ์œผ๋‹ˆ ํ™•์ธ ๋ถ€ํƒ๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹ค ๐Ÿ˜„
์ฆ๊ฑฐ์šด ๊ธˆ์š”์ผ ๋˜์„ธ์š”!

Comment on lines +29 to +34
@GetMapping("/favorites")
public ResponseEntity<List<FavoriteResponse>> getFavorites(@AuthenticationPrincipal LoginMember loginMember) {
List<FavoriteResponse> favorites = favoriteService.findAllFavorite();

return ResponseEntity.ok().body(favorites);
}

Choose a reason for hiding this comment

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

๋กœ๊ทธ์ธ๋œ ์‚ฌ์šฉ์ž์˜ ์ฆ๊ฒจ์ฐพ๊ธฐ ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ๋ชจ๋“  ์‚ฌ์šฉ์ž์˜ ์ฆ๊ฒจ์ฐพ๊ธฐ๊ฐ€ ์กฐํšŒ ๋  ๊ฒƒ ๊ฐ™์•„์š”! ๐Ÿค”

Comment on lines +55 to +57
public void deleteFavorite(Long MemberId, Long favoriteId) {
favoriteRepository.deleteById(favoriteId);
}

Choose a reason for hiding this comment

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

memberId ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  ์žˆ๋„ค์š”
๋กœ๊ทธ์ธํ•œ ์‚ฌ์šฉ์ž๊ฐ€ ์•„๋‹Œ ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค์˜ ์ฆ๊ฒจ์ฐพ๊ธฐ๋„ ์‚ญ์ œ ๋  ์ˆ˜ ์žˆ๊ฒ ์–ด์š” ๐Ÿ˜ข

Comment on lines +46 to +47
@Transactional(readOnly = true)
public List<FavoriteResponse> findAllFavorite() {

Choose a reason for hiding this comment

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

์กฐํšŒ ๋ถ€๋ถ„ ์™ธ์— ๋‹ค๋ฅธ ๊ธฐ๋Šฅ์—๋Š” Transaction ์ด ํ•„์š” ์—†์„๊นŒ์š”? ๐Ÿ˜„

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.

2 participants