Skip to content

Commit

Permalink
feat: 멘토 스터디 조회 DTO StudyResponse로 변경 (#766)
Browse files Browse the repository at this point in the history
* feat: studyResponse로 변경

* feat: 필요없는 dto삭제
  • Loading branch information
AlmondBreez3 authored Sep 5, 2024
1 parent e033b95 commit 076bc66
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.gdschongik.gdsc.domain.study.application.MentorStudyService;
import com.gdschongik.gdsc.domain.study.dto.request.StudyAnnouncementCreateUpdateRequest;
import com.gdschongik.gdsc.domain.study.dto.request.StudyUpdateRequest;
import com.gdschongik.gdsc.domain.study.dto.response.MentorStudyResponse;
import com.gdschongik.gdsc.domain.study.dto.response.StudyResponse;
import com.gdschongik.gdsc.domain.study.dto.response.StudyStudentResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
Expand All @@ -30,8 +30,8 @@ public ResponseEntity<Void> updateStudy(@PathVariable Long studyId, @RequestBody

@Operation(summary = "내 스터디 조회", description = "내가 멘토로 있는 스터디를 조회합니다.")
@GetMapping("/me")
public ResponseEntity<List<MentorStudyResponse>> getStudiesInCharge() {
List<MentorStudyResponse> response = mentorStudyService.getStudiesInCharge();
public ResponseEntity<List<StudyResponse>> getStudiesInCharge() {
List<StudyResponse> response = mentorStudyService.getStudiesInCharge();
return ResponseEntity.ok(response);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import com.gdschongik.gdsc.domain.study.dto.request.StudyAnnouncementCreateUpdateRequest;
import com.gdschongik.gdsc.domain.study.dto.request.StudyCurriculumCreateRequest;
import com.gdschongik.gdsc.domain.study.dto.request.StudyUpdateRequest;
import com.gdschongik.gdsc.domain.study.dto.response.MentorStudyResponse;
import com.gdschongik.gdsc.domain.study.dto.response.StudyResponse;
import com.gdschongik.gdsc.domain.study.dto.response.StudyStudentResponse;
import com.gdschongik.gdsc.global.exception.CustomException;
import com.gdschongik.gdsc.global.exception.ErrorCode;
Expand All @@ -42,10 +42,10 @@ public class MentorStudyService {
private final StudyDetailValidator studyDetailValidator;

@Transactional(readOnly = true)
public List<MentorStudyResponse> getStudiesInCharge() {
public List<StudyResponse> getStudiesInCharge() {
Member currentMember = memberUtil.getCurrentMember();
List<Study> myStudies = studyRepository.findAllByMentor(currentMember);
return myStudies.stream().map(MentorStudyResponse::from).toList();
return myStudies.stream().map(StudyResponse::from).toList();
}

@Transactional(readOnly = true)
Expand Down

This file was deleted.

0 comments on commit 076bc66

Please sign in to comment.