Skip to content

Commit f0a1fe4

Browse files
authored
feat: 코스 상세 조회 시 유저 정보 없으면 유저 아이디 -1 반환 (#159)
1 parent 87a6547 commit f0a1fe4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/main/java/org/runnect/server/course/dto/response/GetCourseDetailResponseDto.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ public static class UserResponseCourseDetail {
3434
private Long userId;
3535

3636
public static UserResponseCourseDetail from(RunnectUser user) {
37-
if (user == null) return null;
38-
return new UserResponseCourseDetail(user.getId());
37+
return new UserResponseCourseDetail(user != null ? user.getId() : -1);
3938
}
4039
}
4140

0 commit comments

Comments
 (0)