Skip to content

Commit

Permalink
Merge pull request #114 from Seasoning-Today/refactor/add-sign-up-eve…
Browse files Browse the repository at this point in the history
…nt-handler-log

회원가입 이벤트 관련 로그 작성
  • Loading branch information
csct3434 authored Apr 12, 2024
2 parents ba07849 + b766edf commit a5e3d2c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package today.seasoning.seasoning.user.event;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
Expand All @@ -12,6 +13,7 @@
import today.seasoning.seasoning.user.domain.User;
import today.seasoning.seasoning.user.domain.UserRepository;

@Slf4j
@Component
@RequiredArgsConstructor
public class SignUpEventHandler {
Expand All @@ -29,5 +31,6 @@ public void addOfficialAccountFriend(SignUpEvent event) {
User officialUser = userRepository.findByIdOrElseThrow(officialAccountUserId);
friendshipRepository.save(new Friendship(signUpUser, officialUser));
friendshipRepository.save(new Friendship(officialUser, signUpUser));
log.info("Sign Up Event - User {}", signUpUser.getId());
}
}

0 comments on commit a5e3d2c

Please sign in to comment.