Skip to content

Commit

Permalink
feat #13 transactional 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
minwoo0419 committed May 27, 2024
1 parent 9e41d9a commit 919edbb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
import org.sopt.practice.repository.TokenRepository;
import org.sopt.practice.service.dto.UserJoinResponse;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@RequiredArgsConstructor
public class TokenService {
private final TokenRepository tokenRepository;
private final JwtTokenProvider jwtTokenProvider;

@Transactional
public Token save(
final Long memberId,
final String refreshToken
Expand All @@ -25,6 +27,8 @@ public Token save(
tokenRepository.save(token);
return token;
}

@Transactional
public UserJoinResponse createTokens(final Long memberId){
String accessToken = jwtTokenProvider.issueAccessToken(
UserAuthentication.createUserAuthentication(memberId)
Expand Down

0 comments on commit 919edbb

Please sign in to comment.