Skip to content

Commit

Permalink
feat: 회원 가입시 모든 알림 허용 처리(#66)
Browse files Browse the repository at this point in the history
- 회원 가입시 모든 알림 허용 처리
- 추후에 사용자가 수정할 수 있게 제공
  • Loading branch information
Minjae-An committed May 10, 2024
1 parent c6d7ec2 commit c18ca5f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions be/src/main/java/yeonba/be/user/service/JoinService.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.springframework.transaction.annotation.Transactional;
import yeonba.be.login.dto.request.UserJoinRequest;
import yeonba.be.login.dto.response.UserJoinResponse;
import yeonba.be.notification.service.NotificationService;
import yeonba.be.user.entity.User;
import yeonba.be.util.JwtUtil;

Expand All @@ -14,17 +15,10 @@
public class JoinService {

private final UserService userService;
private final NotificationService notificationService;

private final JwtUtil jwtUtil;

/*
회원 가입 비즈니스 로직 과정
1. 사용자 엔티티 저장
2. 프로필 사진 엔티티 저장
3. 사용자 선호조건 저장
4. access token 및 refresh token 발급
5. 사용자 refresh token 업데이트
*/
@Transactional
public UserJoinResponse join(UserJoinRequest request) {

Expand All @@ -33,6 +27,9 @@ public UserJoinResponse join(UserJoinRequest request) {
userService.saveProfilePhotos(user, request);
userService.saveUserPreference(user, request);

// 모든 알림 허용
notificationService.saveAllowedNotificationPermissions(user);

// access token, refresh token 발급
Date now = new Date();
String accessToken = jwtUtil.generateAccessToken(user, now);
Expand Down

0 comments on commit c18ca5f

Please sign in to comment.