-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 나의 수강중인 스터디 조회 api 추가 * fix: 진행중인 스터디만 취급하도록 수정 * rename: 메서드 및 dto 이름 변경
- Loading branch information
1 parent
ae66f5e
commit 554d567
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...ain/java/com/gdschongik/gdsc/domain/study/dto/response/StudentMyCurrentStudyResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.gdschongik.gdsc.domain.study.dto.response; | ||
|
||
import com.gdschongik.gdsc.domain.study.domain.StudyHistory; | ||
|
||
public record StudentMyCurrentStudyResponse(Long studyId) { | ||
public static StudentMyCurrentStudyResponse from(StudyHistory studyHistory) { | ||
if (studyHistory == null) { | ||
return new StudentMyCurrentStudyResponse(null); | ||
} | ||
return new StudentMyCurrentStudyResponse(studyHistory.getStudy().getId()); | ||
} | ||
} |