Skip to content

Commit

Permalink
refactor: 행사 상세 정보 조회 dto에서 필요없는 요소 제거
Browse files Browse the repository at this point in the history
- 행사 진행 상태, 남은 일 수 제거

#664
  • Loading branch information
amaran-th committed Oct 7, 2023
1 parent 53749ce commit 7cca4ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ public ResponseEntity<List<EventResponse>> findEvents(
@ResponseStatus(HttpStatus.CREATED)
public EventDetailResponse addEvent(@RequestPart @Valid final EventDetailRequest request,
@RequestPart final List<MultipartFile> images) {
return eventService.addEvent(request, images, LocalDate.now());
return eventService.addEvent(request, images);
}

@PutMapping(path = "/{eventId}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@ResponseStatus(HttpStatus.OK)
public EventDetailResponse updateEvent(@PathVariable final Long eventId,
@RequestPart @Valid final EventDetailRequest request,
@RequestPart final List<MultipartFile> images) {
return eventService.updateEvent(eventId, request, images, LocalDate.now());
return eventService.updateEvent(eventId, request, images);
}

@DeleteMapping("/{eventId}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.emmsale.tag.application.dto.TagRequest;
import com.emmsale.tag.domain.Tag;
import com.emmsale.tag.domain.TagRepository;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import org.junit.jupiter.api.DisplayName;
Expand Down Expand Up @@ -78,7 +77,7 @@ void test_publish_event() throws Exception {
);

//when
eventService.addEvent(eventDetailRequest, null, LocalDate.now());
eventService.addEvent(eventDetailRequest, null);

//then
verify(firebaseCloudMessageClient, times(2))
Expand Down Expand Up @@ -122,7 +121,7 @@ void test_publish_event_no_notification_event_has_no_interest_tag() throws Excep
);

//when
eventService.addEvent(eventDetailRequest, null, LocalDate.now());
eventService.addEvent(eventDetailRequest, null);

//then
verify(firebaseCloudMessageClient, times(0))
Expand Down Expand Up @@ -156,7 +155,7 @@ void test_publish_event_no_notification_member_has_no_interest_tag() throws Exce
);

//when
eventService.addEvent(eventDetailRequest, null, LocalDate.now());
eventService.addEvent(eventDetailRequest, null);

//then
verify(firebaseCloudMessageClient, times(0))
Expand Down

0 comments on commit 7cca4ea

Please sign in to comment.