-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[api-server-v1] feat: UserProfile 조회 API 추가 - /v1/user/profile (#112)
- Loading branch information
Showing
4 changed files
with
50 additions
and
7 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
api/server-v1/src/main/java/kr/joberchip/server/v1/user/controller/dto/UserProfileDTO.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 kr.joberchip.server.v1.user.controller.dto; | ||
|
||
import javax.persistence.Lob; | ||
import kr.joberchip.core.user.User; | ||
|
||
public record UserProfileDTO( | ||
Long userId, String username, String nickname, @Lob String profileImageLink) { | ||
public static UserProfileDTO fromEntity(User user) { | ||
return new UserProfileDTO( | ||
user.getUserId(), user.getUsername(), user.getNickname(), user.getProfileImageLink()); | ||
} | ||
} |
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