Skip to content

Commit

Permalink
[FEAT] 회원가입시, 슬랙에 알림 가도록 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yujindonut committed Dec 18, 2023
1 parent 9a09082 commit 45ca9c7
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ private User issueAccessToken(AuthSignInRequestDTO request) {
.orElseGet(() -> signup(request));
}
private User signup(AuthSignInRequestDTO request) {

try {
if (Objects.equals(activeProfile, "dev")) {
val slackRequest = createSlackRequest(request.nickname(), request.email(), request.createdAt(), String.valueOf(request.socialType()));
slackClient.postMessage(slackRequest.toString());
}
} catch (RuntimeException ex) {
log.error("슬랙 요청이 실패했습니다 : " + ex.getMessage());
}
return userRepository.save(new User(request));
}

Expand Down

0 comments on commit 45ca9c7

Please sign in to comment.