Skip to content

Commit

Permalink
fix: 기본 이미지로 업데이트시 null
Browse files Browse the repository at this point in the history
  • Loading branch information
hanueleee committed Oct 19, 2023
1 parent 25efbfe commit 3fe1d6e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 20 deletions.
12 changes: 1 addition & 11 deletions backend/src/main/java/com/funeat/product/domain/Product.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ public class Product {
@OneToMany(mappedBy = "product")
private List<ProductRecipe> productRecipes;

@Value("${cloud.aws.image.food}")
private String basicFoodImage;

@Value("${cloud.aws.image.store}")
private String basicStoreImage;

protected Product() {
}

Expand Down Expand Up @@ -115,11 +109,7 @@ public Double calculateRankingScore(final Long reviewCount) {
}

public void updateBasicImage() {
if (category.isFood()) {
this.image = basicFoodImage;
return;
}
this.image = basicStoreImage;
this.image = null;
}

public void updateFavoriteImage(final String topFavoriteImage) {
Expand Down
3 changes: 0 additions & 3 deletions backend/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,3 @@ cloud:
bucket: { S3_BUCKET }
folder: { S3_DEV_FOLDER }
cloudfrontPath: { S3_DEV_CLOUDFRONT_PATH }
image:
food: { DEV_BASIC_FOOD_IMAGE }
store: { DEV_BASIC_STORE_IMAGE }
3 changes: 0 additions & 3 deletions backend/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,3 @@ cloud:
bucket: { S3_BUCKET }
folder: { S3_LOCAL_FOLDER }
cloudfrontPath: { S3_LOCAL_CLOUDFRONT_PATH }
image:
food: { LOCAL_BASIC_FOOD_IMAGE }
store: { LOCAL_BASIC_STORE_IMAGE }
3 changes: 0 additions & 3 deletions backend/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,3 @@ cloud:
bucket: { S3_BUCKET }
folder: { S3_PROD_FOLDER }
cloudfrontPath: { S3_PROD_CLOUDFRONT_PATH }
image:
food: { PROD_BASIC_FOOD_IMAGE }
store: { PROD_BASIC_STORE_IMAGE }

0 comments on commit 3fe1d6e

Please sign in to comment.