Skip to content

Commit 43455a0

Browse files
authored
Fix : 유저 프로필 수정, 삭제 (#92)
1 parent d7ae303 commit 43455a0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/ita/tinybite/domain/user/controller/UserController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ public APIResponse<?> validateNickname(@RequestParam String nickname) {
208208
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
209209
)
210210
})
211-
@PutMapping("/profile-image")
211+
@PatchMapping("/me/profile-image")
212212
public ResponseEntity<Void> updateProfileImage(
213213
@Parameter(description = "변경할 프로필 이미지 URL", required = true, example = "https://example.com/image.jpg")
214-
@RequestParam("image") String image,
214+
@RequestBody String image,
215215
@Parameter(hidden = true)
216216
@AuthenticationPrincipal Long userId) {
217217

@@ -239,7 +239,7 @@ public ResponseEntity<Void> updateProfileImage(
239239
content = @Content(schema = @Schema(implementation = ErrorResponse.class))
240240
)
241241
})
242-
@DeleteMapping("/profile-image")
242+
@DeleteMapping("/me/profile-image")
243243
public ResponseEntity<Void> deleteProfileImage(
244244
@Parameter(hidden = true)
245245
@AuthenticationPrincipal Long userId) {

src/main/java/ita/tinybite/domain/user/entity/User.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,6 @@ public void updateProfileImage(String image) {
104104
}
105105

106106
public void deleteProfileImage() {
107-
this.profileImage = "";
107+
this.profileImage = null;
108108
}
109109
}

0 commit comments

Comments
 (0)