Skip to content

Commit

Permalink
Merge pull request #89 from Nook-Book/develop
Browse files Browse the repository at this point in the history
[DEPLOY]
  • Loading branch information
jisujeong0 authored Jan 21, 2025
2 parents 5aea11a + 057276f commit c3c4658
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public ResponseEntity<ApiResponse> getMyInfo(UserPrincipal userPrincipal) {
MyInfoRes myInfoRes = MyInfoRes.builder()
.nicknameId(user.getNicknameId())
.nickname(user.getNickname())
.imageUrl(user.getImageUrl())
.friendsNum(num)
.build();

Expand All @@ -193,7 +194,7 @@ public ResponseEntity<?> updateImage(UserPrincipal userPrincipal, Boolean isDefa
String imageUrl;
if (isDefaultImage && image.isEmpty()) {
imageName = "default.png";
imageUrl = "https://"; // μΆ”ν›„ μˆ˜μ •
imageUrl = "https://nookbook-image-bucket.s3.amazonaws.com/default.png";
} else {
imageName = s3Uploader.uploadImage(image.get());
imageUrl = s3Uploader.getFullPath(imageName);
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/nookbook/domain/user/domain/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ public class User extends BaseEntity {

private String providerId;

// μ΄λ―Έμ§€λŠ” κΈ°λ³Έ κ³ μ • ν•„μš”
private String imageUrl = "https://";
private String imageUrl = "https://nookbook-image-bucket.s3.amazonaws.com/default.png";

private String imageName = "default.png";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public class MyInfoRes {
@Schema(type = "String", example = "κΈ°λ¬΄λΌνƒ€μΏ μ•Όκ°€λ˜", description = "μ‚¬μš©μžμ˜ λ‹‰λ„€μž„μž…λ‹ˆλ‹€.")
private String nickname;

@Schema(type = "String", example = "https://nookbook-s3-bucket.amazons.com/akfjvndij0e3.png", description = "μ‚¬μš©μžμ˜ ν”„λ‘œν•„ 사진 URLμž…λ‹ˆλ‹€.")
private String imageUrl;

@Schema(type = "int", example = "12", description = "νŠΉμ • μ‚¬μš©μžμ˜ 친ꡬ 수 μž…λ‹ˆλ‹€.")
private int friendsNum;
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public ResponseEntity<?> findReadingReportByYear(
return bookService.countReadBooksByYear(userPrincipal, year);
}

@Operation(summary = "[λ§ˆμ΄νŽ˜μ΄μ§€] λ‚΄ 정보 쑰회", description = "λ§ˆμ΄νŽ˜μ΄μ§€μ˜ λ‚΄ 정보(아이디, λ‹‰λ„€μž„, 친ꡬ 수)λ₯Ό μ‘°νšŒν•©λ‹ˆλ‹€.")
@Operation(summary = "[λ§ˆμ΄νŽ˜μ΄μ§€] λ‚΄ 정보 쑰회", description = "λ§ˆμ΄νŽ˜μ΄μ§€μ˜ λ‚΄ 정보(아이디, λ‹‰λ„€μž„, ν”„λ‘œν•„ 이미지, 친ꡬ 수)λ₯Ό μ‘°νšŒν•©λ‹ˆλ‹€.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "쑰회 성곡", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = MyInfoRes.class) ) } ),
@ApiResponse(responseCode = "400", description = "쑰회 μ‹€νŒ¨", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorResponse.class) ) } ),
Expand Down

0 comments on commit c3c4658

Please sign in to comment.