Skip to content

Commit

Permalink
[!HOTFIX] 회원가입 오류확인용 로그작성
Browse files Browse the repository at this point in the history
  • Loading branch information
siyeonkm committed Dec 17, 2023
1 parent 06b2ba4 commit 8eb7952
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer m
assert authAccountAnnotation != null;

final Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
log.info("[SIGNUP-AUTH] Authentication: " + authentication.getPrincipal());

if (authentication.getPrincipal() == "anonymousUser") {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public class AccountController {

@PostMapping("/signup")
public ResponseEntity<SignUpRes> signUp(@Valid @RequestBody AccountReq accountReq) {
log.info("[SIGNUP-CONTROLLER] Request: " + accountReq);

SignUpRes response = accountService.signUp(accountReq);
return new ResponseEntity<>(response, HttpStatus.OK);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public class AccountService {
private final RedisService redisService;

public SignUpRes signUp(AccountReq accountReq) {
log.info("[SIGNUP-SERVICE] Request: " + accountReq);

if (!accountReq.isValid()) {
throw new IllegalArgumentException("사용자에 대한 올바른 정보를 입력해주세요.");
}
Expand All @@ -31,6 +33,7 @@ else if(accountDomainService.existsAccountByEmail(accountReq.getEmail())){
accountReq.getEmail(),
accountReq.getName(),
jwtService.encryptPassword(accountReq.getPassword()));

return new SignUpRes(newAccount.getName());
}

Expand Down

0 comments on commit 8eb7952

Please sign in to comment.