Skip to content

Conversation

@DHkimgit
Copy link
Collaborator

🔍 개요

  • 분실물 게시글 수정 API

🚀 주요 변경 내용

  • 분실물 게시글 수정 API 추가

💬 참고 사항


✅ Checklist (완료 조건)

  • 코드 스타일 가이드 준수
  • 테스트 코드 포함됨
  • Reviewers / Assignees / Labels 지정 완료
  • 보안 및 민감 정보 검증 (API 키, 환경 변수, 개인정보 등)

@github-actions github-actions bot added the Team Campus 캠퍼스 팀에서 작업할 이슈입니다 label Jan 18, 2026
@github-actions
Copy link

Unit Test Results

673 tests   670 ✔️  1m 19s ⏱️
165 suites      3 💤
165 files        0

Results for commit 4b29b67.

Copy link
Contributor

@dh2906 dh2906 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 +195 to +196
lostItemArticle.deleteImages(request.deleteImageIds());
lostItemArticle.addNewImages(request.newImages());
Copy link
Contributor

Choose a reason for hiding this comment

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

삭제 없이 새 이미지를 매 요청마다 최대 10개씩 추가할 수 있어, 동일한 요청을 여러 번 보낼 경우 총 이미지 수가 10개를 초과할 위험이 있어 보여요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이거 게시글 등록 API에서도 검증 로직이 없어서 뺐습니다.

Copy link
Contributor

@kih1015 kih1015 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 +183 to +199
@Transactional
public LostItemArticleResponse updateLostItemArticle(Integer userId, Integer articleId, LostItemArticleUpdateRequest request) {
LostItemArticle lostItemArticle = lostItemArticleRepository.getByArticleId(articleId);
lostItemArticle.checkOwnership(userId);

lostItemArticle.update(
request.category(),
request.foundPlace(),
request.foundDate(),
request.content()
);

lostItemArticle.deleteImages(request.deleteImageIds());
lostItemArticle.addNewImages(request.newImages());

return LostItemArticleResponse.of(lostItemArticle.getArticle(), true);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

깔끔쓰하네요

@DHkimgit DHkimgit merged commit c174c34 into develop Jan 19, 2026
7 checks passed
@DHkimgit DHkimgit deleted the feat/2134-add-lost-item-article-modify branch January 19, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team Campus 캠퍼스 팀에서 작업할 이슈입니다

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[캠퍼스] 분실물 게시글 수정 API 추가

4 participants