Skip to content
This repository has been archived by the owner on Dec 7, 2024. It is now read-only.

312 delete notice #313

Merged
merged 6 commits into from
Apr 2, 2024
Merged

312 delete notice #313

merged 6 commits into from
Apr 2, 2024

Conversation

ta2ye0n
Copy link
Contributor

@ta2ye0n ta2ye0n commented Apr 2, 2024

๐Ÿ’ก ๊ฐœ์š”

๊ณต์ง€์‚ฌํ•ญ ์‚ญ์ œ api๋ฅผ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค

๐Ÿ“ƒ ์ž‘์—…๋‚ด์šฉ

  • ๊ณต์ง€ ์‚ฌํ•ญ ์‚ญ์ œ ๊ธฐ๋Šฅ ์ถ”๊ฐ€

@ani2689
Copy link
Member

ani2689 commented Apr 2, 2024

security config์— url์„ ์ถ”๊ฐ€ํ•ด์ฃผ์—ˆ์„๊นŒ์š”? ๋ณ€๊ฒฝ์‚ฌํ•ญ์—๋Š” ๋ณด์ด์ง€ ์•Š๋„ค์š” ๐Ÿ˜ฅ

@@ -25,4 +28,11 @@ class NoticeController(
.let { createNoticeService.execute(clubId, it) }
.let { ResponseEntity.status(HttpStatus.CREATED).build() }

@DeleteMapping("/{id}")
fun deleteNotice(
@PathVariable("id") id: Long
Copy link
Contributor

Choose a reason for hiding this comment

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

๊ตณ์ด ๋ช…์‹œ ์•ˆํ•ด์ค˜๋„ ๋  ๊ฒƒ ๊ฐ™์•„์š”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

5eb6382
์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค

Comment on lines 24 to 27
val notice = noticeRepository.findByIdOrNull(id)
?: throw NoticeNotFoundException()

noticeRepository.delete(notice)
Copy link
Contributor

Choose a reason for hiding this comment

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

๋จผ์ € ์—”ํ‹ฐํ‹ฐ๋ฅผ ์ฐพ๊ณ  delete ๋ฉ”์„œ๋“œ์— ๋„˜๊ธฐ๋Š” ๋ฐฉ์‹์œผ๋กœ ์ž‘์„ฑํ•˜์…จ๋Š”๋ฐ ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด delete ๋‚ด๋ถ€ ๊ตฌํ˜„์ฒด์—์„œ find ์ฟผ๋ฆฌ๋ฅผ ๋ฐœ์ƒ ์‹œํ‚ค๊ธฐ ๋•Œ๋ฌธ์— deleteById๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๊ฒŒ ์–ด๋–จ๊นŒ ์‹ถ๋„ค์š”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

47105b8
์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค

@ta2ye0n ta2ye0n merged commit 48dc99a into develop Apr 2, 2024
1 check passed
@ta2ye0n ta2ye0n deleted the 312-delete-notice branch April 2, 2024 11:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants