Skip to content

Commit

Permalink
#33 [chore] 로그 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hysong4u committed Dec 5, 2024
1 parent e61885a commit b0be5bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ public OAuth2User loadUser(OAuth2UserRequest userRequest) {
existingUser.setGithubToken(accessToken);
return userRepository.save(existingUser);
}).orElseGet(() -> {
// 새로운 사용자일 경우 생성
// 새로운 사용자일 경우 생성중
User newUser = userRepository.save(User.builder()
.githubId(githubEmail)
.githubToken(accessToken)
.userRole(UserRole.USER)
.build());
System.out.println("새로운 사용자 등록 완료");
webhookService.sendDiscordNotification();
System.out.println("웹훅 호출 완료");
return newUser;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class WebhookService {

// 회원가입 웹훅
public String sendDiscordNotification() {
System.out.println("Discord Webhook 호출중");
RestTemplate restTemplate = new RestTemplate();
Long totalMembers = userRepository.count();
Long totalRepos = repoRepository.count();
Expand Down

0 comments on commit b0be5bb

Please sign in to comment.