Skip to content

Commit

Permalink
hotfix: 주최 시, 이미지 없을 경우 place img 저장하도록 변경 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
ympark99 committed Oct 19, 2023
1 parent 44bd74c commit 6b76ca8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ public ResponseEntity<SparkHostResponse> host(@AuthenticationPrincipal CustomUse
Member host = customUserDetails.getMember();
Spark spark = this.sparkUseCase.uploadSpark(host, hostDto);
return ResponseEntity.ok().body(
new SparkHostResponse(spark.getSparkId(),
img == null ? spark.getPlace().getImg() : spark.getImg())
new SparkHostResponse(spark.getSparkId(), spark.getImg())
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class SparkService implements SparkUseCase {
public Spark uploadSpark(Member host, HostDto hostDto) {
Place place = placeUseCase.getById(hostDto.getPlaceId());
String imgUrl = hostDto.getImg() == null
? ""
? place.getImg()
: uploadS3Port.uploadS3(hostDto.getImg());
return saveSparkPort.saveSpark(host, place, hostDto, imgUrl);
}
Expand Down

0 comments on commit 6b76ca8

Please sign in to comment.