Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] hotfix: 기본 이미지로 업데이트 로직에 환경변수 제거 #830

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions backend/src/main/java/com/funeat/product/domain/Product.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import org.springframework.beans.factory.annotation.Value;

@Entity
public class Product {

public static final String BASIC_IMAGE = null;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
Expand All @@ -41,12 +42,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 +110,7 @@ public Double calculateRankingScore(final Long reviewCount) {
}

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

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 }