-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' of https://github.com/BugFlix/server into dev
- Loading branch information
Showing
12 changed files
with
140 additions
and
57 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,16 +13,21 @@ public class ProfileResponse { | |
private String imageUrl; | ||
@Schema(description = "사용자의 email 주소", example = "[email protected]") | ||
private String email; | ||
private Boolean followed; | ||
|
||
private ProfileResponse(User user, Profile profile) { | ||
private ProfileResponse(User user, Profile profile, Boolean followed) { | ||
nickname = user.getNickname(); | ||
email = user.getEmail(); | ||
if (profile.getImageUrl() != null) { | ||
this.imageUrl = profile.getImageUrl(); | ||
} | ||
this.followed = followed; | ||
} | ||
|
||
public static ProfileResponse of(User user, Profile profile) { | ||
return new ProfileResponse(user, profile); | ||
return new ProfileResponse(user, profile, false); | ||
} | ||
public static ProfileResponse of(User user, Profile profile, Boolean followed) { | ||
return new ProfileResponse(user, profile, followed); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/com/bugflix/weblog/profile/dto/ProfileUpdateRequest.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,30 @@ | ||
package com.bugflix.weblog.profile.dto; | ||
|
||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.validation.constraints.Size; | ||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Schema(description = "프로필 수정 요청", | ||
requiredProperties = {"nickname", "imageUrl", "phoneNumber"}) | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class ProfileUpdateRequest { | ||
|
||
@Schema(description = "별명", example = "namu") | ||
@Size(min = 2, max = 25) | ||
@NotNull | ||
private String nickname; | ||
|
||
@NotNull | ||
@Schema(description = "프로필 이미지") | ||
private String imageUrl; | ||
|
||
@NotNull | ||
@Schema(description = "전화번호", example = "01012341234") | ||
private String phoneNumber; | ||
|
||
} |
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
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