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

Api: ๐Ÿ› ๋ชฉํ‘œ ๊ธˆ์•ก DELETE ์œ ์ฆˆ ์ผ€์ด์Šค ์ž˜๋ชป๋œ ํ•„ํ„ฐ๋ง ์ œ๊ฑฐ #132

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

psychology50
Copy link
Member

์ž‘์—… ์ด์œ 

  • iOS ํŒ€์—์„œ ์ถ”์ฒœํ•  ์ตœ๊ทผ ๋ชฉํ‘œ ๊ธˆ์•ก์ด ์—†์„ ์‹œ, DELETE ์š”์ฒญ์„ ์ˆ˜ํ–‰ํ•˜๋ฉด 404 NOT FOUND ์˜ˆ์™ธ ๋ฐœ์ƒ

์ž‘์—… ์‚ฌํ•ญ

TargetAmount targetAmount = targetAmountService.readTargetAmount(targetAmountId)
                .filter(TargetAmount::isAllocatedAmount)
                .orElseThrow(() -> new TargetAmountErrorException(TargetAmountErrorCode.NOT_FOUND_TARGET_AMOUNT));

๊ธฐ์กด์—๋Š” "amount == -1", ์ฆ‰ ๋ชฉํ‘œ ๊ธˆ์•ก์ด ์„ค์ •๋˜์–ด ์žˆ์ง€ ์•Š๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ํ•„ํ„ฐ๋งํ•ด๋„ ๋ฌด๋ฐฉํ–ˆ์Šต๋‹ˆ๋‹ค.
ํ•˜์ง€๋งŒ ๋ชฉํ‘œ ๊ธˆ์•ก์— is_read๋ผ๋Š” ํ•„๋“œ๊ฐ€ ์ถ”๊ฐ€๋˜๋ฉด์„œ, ๋ชฉํ‘œ ๊ธˆ์•ก์ด ํ• ๋‹น๋˜์–ด ์žˆ์ง€ ์•Š์„ ๋•Œ์—์„œ is_read๋ฅผ false๋กœ ๋ฐ”๊พธ๊ธฐ ์œ„ํ•ด DELETE ์š”์ฒญ์„ ๋ณด๋‚ด๋Š” Usecase๊ฐ€ ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๋”ฐ๋ผ์„œ filter๋ฅผ ์ œ๊ฑฐํ•˜์—ฌ ์š”์ฒญ์„ ์„ฑ๊ณต์ ์œผ๋กœ ์ฒ˜๋ฆฌํ•˜๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.


๋ฆฌ๋ทฐ์–ด๊ฐ€ ์ค‘์ ์ ์œผ๋กœ ํ™•์ธํ•ด์•ผ ํ•˜๋Š” ๋ถ€๋ถ„

  • ์—†์Œ

๋ฐœ๊ฒฌํ•œ ์ด์Šˆ

  • ์—†์Œ

@psychology50 psychology50 added bug ๊ธด๊ธ‰ํ•˜๊ณ , ์ค‘์š”๋„๊ฐ€ ๋†’์€ ์ด์Šˆ fix ๊ธฐ๋Šฅ ์ˆ˜์ • labels Jul 15, 2024
@psychology50 psychology50 self-assigned this Jul 15, 2024
@psychology50 psychology50 merged commit 3bc5ea6 into dev Jul 15, 2024
2 checks passed
@psychology50 psychology50 deleted the fix/PW-421-target-amounts-delete-not-found branch July 15, 2024 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ๊ธด๊ธ‰ํ•˜๊ณ , ์ค‘์š”๋„๊ฐ€ ๋†’์€ ์ด์Šˆ fix ๊ธฐ๋Šฅ ์ˆ˜์ •
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant