Skip to content

Commit

Permalink
refactor: 알림 채널 웹훅 URL 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
HyeonsuLee committed Sep 14, 2024
1 parent 9a88850 commit eb71e90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ public class SlackNotificationFactory {
private final String adminReviewPageUrl;
private final String ownerEventNotificationUrl;
private final String eventNotificationUrl;
private final String reviewNotificationUrl;

public SlackNotificationFactory(
@Value("${koin.admin.shop.url}") String adminPageUrl,
@Value("${koin.admin.review.url}") String adminReviewPageUrl,
@Value("${slack.koin_event_notify_url}") String eventNotificationUrl,
@Value("${slack.koin_owner_event_notify_url}") String ownerEventNotificationUrl
@Value("${slack.koin_owner_event_notify_url}") String ownerEventNotificationUrl,
@Value("${slack.koin_shop_review_notify_url}") String reviewNotificationUrl
) {
this.adminPageUrl = adminPageUrl;
this.adminReviewPageUrl = adminReviewPageUrl;
this.eventNotificationUrl = eventNotificationUrl;
this.ownerEventNotificationUrl = ownerEventNotificationUrl;
this.reviewNotificationUrl = reviewNotificationUrl;
}

/**
Expand Down Expand Up @@ -149,7 +152,7 @@ public SlackNotification generateReviewRegisterNotification(
Integer rating
) {
return SlackNotification.builder()
.slackUrl(eventNotificationUrl)
.slackUrl(reviewNotificationUrl)
.text(String.format("""
`%s에 새로운 리뷰가 등록되었습니다.`
내용: `%s`
Expand All @@ -174,7 +177,7 @@ public SlackNotification generateReviewReportNotification(
String shop
) {
return SlackNotification.builder()
.slackUrl(eventNotificationUrl)
.slackUrl(reviewNotificationUrl)
.text(String.format("""
`%s의 리뷰가 신고되었습니다.`
`신고를 처리해주세요!!`
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ swagger:
slack:
koin_event_notify_url: https://slack-weehookurl.com
koin_owner_event_notify_url: https://slack-weehookurl.com
koin_shop_review_notify_url: https://slack-weehookurl.com
logging:
error: https://slack-weehookurl.com

Expand Down

0 comments on commit eb71e90

Please sign in to comment.