Skip to content

Commit

Permalink
photo/information API photoId 리턴
Browse files Browse the repository at this point in the history
  • Loading branch information
SeWooooong committed Nov 18, 2023
1 parent 75ebf6b commit a66e02d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public ResponseEntity<String> insertPhoto(@RequestBody MemberPhotoBase64 memberP
* Base64 사진 입력
*/
@PostMapping("/photo/information")
public ResponseEntity<String> insertPhoto(@RequestBody MemberPhotoInfo memberPhotoInfo)throws IOException {
public ResponseEntity<Long> insertPhoto(@RequestBody MemberPhotoInfo memberPhotoInfo)throws IOException {
return ResponseEntity.ok(memberPhotoService.insertMemberPhotoInfo(memberPhotoInfo));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ public String insertBase64Photo(MemberPhotoBase64 memberPhotoBase64) throws IOEx
return s3Result.getImgUrl();
}

public String insertMemberPhotoInfo(MemberPhotoInfo memberPhotoInfo) throws IOException {
public Long insertMemberPhotoInfo(MemberPhotoInfo memberPhotoInfo) throws IOException {
Member member = memberRepository.findById(memberPhotoInfo.getMemberId()).orElseThrow();
MemberPhoto memberPhoto = new MemberPhoto(memberPhotoInfo.getName(), memberPhotoInfo.getDescription(), memberPhotoInfo.getImgUrl(), member);
memberPhotoRepository.save(memberPhoto);
return "유저 사진 정보 저장 완료";
return memberPhoto.getId();
}

public String insertIpfs(Long memberPhotoId) throws IOException {
Expand Down

0 comments on commit a66e02d

Please sign in to comment.