Skip to content

[FEAT/#120] 루트 목록 수정 API 구현 - #121

Merged
youtheyeon merged 3 commits into
developfrom
feat/120/update-route
Oct 7, 2026
Merged

youtheyeon merged 3 commits into
developfrom
feat/120/update-route

Conversation

@youtheyeon

Copy link
Copy Markdown
Contributor

📌 Related Issue

📤 Tasks

  • 활동 루트 목록 수정 API 구현 (PUT /api/v1/activity/{activityId}/route)
  • 요청한 순서에 따라 기존 루트 목록을 교체하도록 처리
  • 기존 목록과 동일한 요청은 루트를 재생성하지 않도록 처리
  • 루트 요청 DTO 네이밍 통일 (RoutesCreateRequest, RoutesUpdateRequest)

📸 Screenshot

루트 수정 API 테스트 결과 스크린샷 2026-10-06 오후 11 58 41 스크린샷 2026-10-06 오후 11 58 51

💌 To Reviewer


@youtheyeon youtheyeon self-assigned this Oct 6, 2026
@youtheyeon youtheyeon added the enhancement New feature or request label Oct 6, 2026
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: Team-Routee/Routee-Server/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 90ca6334-c564-44a5-8e12-41284a92555e
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@khj011219 khj011219 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

기존 루트와 비교해서 불필요한 루트 삭제와 재생성을 방지한 점 좋았습니다! 구현하시느라 고생하셨습니다 👍

Comment on lines +56 to +64
List<Route> existingRoutes = routeRepository.findByActivityIdOrderBySequenceAsc(activityId);
List<UpdateRouteCommand> existingCommands = existingRoutes.stream()
.map(route -> new UpdateRouteCommand(route.getName(), route.getSequence()))
.toList();
if (existingCommands.equals(sortedCommands)) {
return existingRoutes.stream()
.map(RouteMapper::toResult)
.toList();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

기존과 Route와 동일한 경우에 early return 하는 방법은 정말 좋은 것 같아요!

Comment on lines +49 to +50
Activity activity = activityRepository.findById(activityId)
.orElseThrow(ActivityNotFoundException::new);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

현재 로직에서 Activity를 사용하지 않는다면 엔티티를 실제로 불러오는 방법보다는 exists등을 이용해서 불필요한 데이터의 로딩을 방지하면서 검증하는 방법도 좋을 것 같아요!

@Kyoung-M1N Kyoung-M1N left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

빠르게 대응하면서도 너무 꼼꼼하게 로직을 잘 작성해주신 것 같아요!
고생하셨습니다!👍

@youtheyeon youtheyeon removed the enhancement New feature or request label Oct 7, 2026
@youtheyeon
youtheyeon merged commit 79e6ce4 into develop Oct 7, 2026
3 checks passed
@youtheyeon
youtheyeon deleted the feat/120/update-route branch November 6, 2026 08:48
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.

[FEAT] 루트 목록 수정 API 구현

3 participants