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.

1 participant