Skip to content

Commit

Permalink
feat [#111] 타임테이블에 페스티벌 추가 API 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1hyun committed Jan 19, 2025
1 parent b1c1bb7 commit 27226f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ public void removeTimetableFestival(final long userId, final long festivalId) {
@Transactional
public void addTimetableFestivals(final long userId, final AddTimetableFestivalDTO from) {
User user = userService.findById(userId);
List<Festival> currentFestivals = timetableFestivalService.findByUserId(userId).stream()
.map(TimetableFestival::getFestival)
.toList();
List<Festival> addFestivals = festivalService.findByIdIn(
from.festivals().stream()
.distinct()
.map(AddTimetableFestivalArtiestDTO::festivalId)
.toList()
);
List<Festival> currentFestivals = timetableFestivalService.findByUserId(userId).stream()
.map(TimetableFestival::getFestival)
.toList();

validateDuplicateTimetableFestival(currentFestivals, addFestivals);
validateCountTimetableFestival(currentFestivals.size(), addFestivals.size());
Expand Down

This file was deleted.

0 comments on commit 27226f9

Please sign in to comment.