diff --git a/server/src/main/java/com/yogit/server/board/service/boarduser/BoardUserServiceImpl.java b/server/src/main/java/com/yogit/server/board/service/boarduser/BoardUserServiceImpl.java index 18c3260..124566d 100644 --- a/server/src/main/java/com/yogit/server/board/service/boarduser/BoardUserServiceImpl.java +++ b/server/src/main/java/com/yogit/server/board/service/boarduser/BoardUserServiceImpl.java @@ -15,6 +15,7 @@ import com.yogit.server.global.dto.ApplicationResponse; import com.yogit.server.s3.AwsS3Service; import com.yogit.server.user.entity.User; +import com.yogit.server.user.entity.UserStatus; import com.yogit.server.user.exception.NotFoundUserException; import com.yogit.server.user.repository.UserRepository; import com.yogit.server.user.service.UserService; @@ -80,7 +81,7 @@ public ApplicationResponse joinBoardUser(CreateBoardUserReq dto) { // 호스트에게 참여 APN 푸쉬 알림 try { - apnService.createBoardUserJoinAPN(new CreateBoardUserJoinAPNReq(board.getHost().getDeviceToken(), user.getName(), board.getId(), board.getTitle())); + if(user.getUserStatus().equals(UserStatus.LOGIN)) apnService.createBoardUserJoinAPN(new CreateBoardUserJoinAPNReq(board.getHost().getDeviceToken(), user.getName(), board.getId(), board.getTitle())); } catch (ExecutionException e) { e.printStackTrace(); } catch (InterruptedException e) { diff --git a/server/src/main/java/com/yogit/server/board/service/clipboard/ClipBoardServiceImpl.java b/server/src/main/java/com/yogit/server/board/service/clipboard/ClipBoardServiceImpl.java index 5c4ded3..d103be5 100644 --- a/server/src/main/java/com/yogit/server/board/service/clipboard/ClipBoardServiceImpl.java +++ b/server/src/main/java/com/yogit/server/board/service/clipboard/ClipBoardServiceImpl.java @@ -1,6 +1,5 @@ package com.yogit.server.board.service.clipboard; -import com.yogit.server.apns.dto.req.CreateBoardUserJoinAPNReq; import com.yogit.server.apns.dto.req.CreateClipBoardAPNReq; import com.yogit.server.apns.service.APNService; import com.yogit.server.block.repository.BlockRepository; @@ -22,6 +21,7 @@ import com.yogit.server.global.dto.ApplicationResponse; import com.yogit.server.s3.AwsS3Service; import com.yogit.server.user.entity.User; +import com.yogit.server.user.entity.UserStatus; import com.yogit.server.user.exception.NotFoundUserException; import com.yogit.server.user.repository.UserRepository; import com.yogit.server.user.service.UserService; @@ -79,7 +79,7 @@ public ApplicationResponse createClipBoard(CreateClipBoardReq dto) if(boardUsers!=null){ for(BoardUser bu: boardUsers){ try { - apnService.createClipBoardAPN(new CreateClipBoardAPNReq(bu.getUser().getDeviceToken(), user.getName(), board.getId(), board.getTitle())); + if(user.getUserStatus().equals(UserStatus.LOGIN)) apnService.createClipBoardAPN(new CreateClipBoardAPNReq(bu.getUser().getDeviceToken(), user.getName(), board.getId(), board.getTitle())); } catch (ExecutionException e) { e.printStackTrace(); } catch (InterruptedException e) { diff --git a/server/src/main/java/com/yogit/server/user/controller/UserController.java b/server/src/main/java/com/yogit/server/user/controller/UserController.java index 1cccd83..3673e72 100644 --- a/server/src/main/java/com/yogit/server/user/controller/UserController.java +++ b/server/src/main/java/com/yogit/server/user/controller/UserController.java @@ -255,7 +255,7 @@ public ApplicationResponse addDeviceToken(@ModelAttribute Ad }) @PostMapping(value = "/log-out") @ResponseBody - public ApplicationResponse logInApple(@ModelAttribute LogoutReq logoutReq) { + public ApplicationResponse logOut(@ModelAttribute LogoutReq logoutReq) { return userService.logout(logoutReq); }