Skip to content

Commit

Permalink
[fix] 유저 프로필 사진 등록 시 null 처리 에러 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryeolee committed Nov 12, 2023
1 parent 38dea30 commit c0588d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: ModernFarmer CI/CD

on:
push:
branches: ["feature_21/-유저-오픈-페인-API"]
branches: ["feature_25/유저-정보-조회"]

pull_request:
branches: ["dev"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ public BaseResponseDto emitNickname(HttpServletRequest request, @RequestBody Pro
}

@PostMapping(value = "/select-information", produces = MediaType.APPLICATION_JSON_VALUE)
public BaseResponseDto selectProfileImageAndNickname(HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile multipartFile, @RequestParam("nickName")String nickName) throws IOException {
public BaseResponseDto selectProfileImageAndNickname(HttpServletRequest request, @RequestPart(value = "file", required = false) MultipartFile multipartFile, @RequestParam("nickName")String nickName) throws IOException {

String userId = jwtTokenProvider.getUserId(request);
log.info(userId);

BaseResponseDto responseDto = userService.selectProfileImageAndNickname(Long.valueOf(userId), multipartFile,nickName);

return responseDto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public BaseResponseDto emitNickname(Long userId, String nickName){
return BaseResponseDto.of(SuccessMessage.SUCCESS,null);
}

public BaseResponseDto selectProfileImageAndNickname(Long userId,MultipartFile multipartFile,
public BaseResponseDto selectProfileImageAndNickname(Long userId, MultipartFile multipartFile,
String nickName) throws IOException {

if(multipartFile.isEmpty()){
Expand Down

0 comments on commit c0588d9

Please sign in to comment.