From ca445def196fe39f9cf9b34a7fd5f8a0e0fc004f Mon Sep 17 00:00:00 2001 From: Kimsangwon Date: Tue, 10 Sep 2024 16:06:57 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=EC=B4=88=EB=8C=80=20=EC=88=98?= =?UTF-8?q?=EB=9D=BD=EC=9D=84=20JWT=20Filter=EC=97=90=EC=84=9C=20=EC=A0=9C?= =?UTF-8?q?=EC=99=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/Backend/shareNote/domain/Jwt/JWTFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Jwt/JWTFilter.java b/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Jwt/JWTFilter.java index 8aa57691..9d55db5d 100644 --- a/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Jwt/JWTFilter.java +++ b/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Jwt/JWTFilter.java @@ -27,7 +27,7 @@ public class JWTFilter extends OncePerRequestFilter { private final List permitAllUrls = List.of("/api/user/login", "/api/user/signUp", "/", "/api/user/reissue", "/api/user/cookieToJwt","/api/user/uniqueEmail/.*","/api/user/uniqueNickname/.*","/swagger-ui.html" - ,"/api/user/organization/invitation/accept", "/api/image"); + ,"/api/user/organization/invitation/accept", "/api/image", "/api/organization/invitation/approve"); @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { String requestURI = request.getRequestURI(); From 40bba3ae18193a422733385f82305ebba6674cdd Mon Sep 17 00:00:00 2001 From: Kimsangwon Date: Wed, 11 Sep 2024 17:30:48 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=EC=95=8C=EB=A6=BC=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.fcm 프로젝트 변경 2.안드로이드에 넘기는 퀴즈 body 값 변경 --- .../Oraganization/service/FirebaseCloudMessageService.java | 2 +- .../shareNote/domain/Oraganization/service/QuizService.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Oraganization/service/FirebaseCloudMessageService.java b/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Oraganization/service/FirebaseCloudMessageService.java index ba0ee336..c2de900a 100644 --- a/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Oraganization/service/FirebaseCloudMessageService.java +++ b/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Oraganization/service/FirebaseCloudMessageService.java @@ -19,7 +19,7 @@ @RequiredArgsConstructor public class FirebaseCloudMessageService { private final String API_URL = "https://fcm.googleapis.com/v1/projects/" + - "sharenote-64aaf/messages:send"; + "fcmalarm-258f5/messages:send"; private final ObjectMapper objectMapper; public void sendMessageTo(String targetToken, String title, String body) throws IOException { diff --git a/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Oraganization/service/QuizService.java b/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Oraganization/service/QuizService.java index b1b46ee3..dd91ed67 100644 --- a/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Oraganization/service/QuizService.java +++ b/backend/shareNote/src/main/java/com/Backend/shareNote/domain/Oraganization/service/QuizService.java @@ -82,7 +82,9 @@ public ResponseEntity createQuiz(QuizCreateDTO quizCreateDTO) { //알림 보내기 for(String fcm : fcmList){ log.info("fcm: " + fcm); - firebaseCloudMessageService.sendMessageTo(fcm, "새로운 퀴즈가 등록되었습니다.", quizCreateDTO.getQuizTitle()); + //아 의사소통 부재로 이 필드는 null이라서 body값이 null이라 안드로이드에서 알림을 안날린 듯 + //고쳐도 안되네 그래도 일단 keep + firebaseCloudMessageService.sendMessageTo(fcm, "새로운 퀴즈가 등록되었습니다.", quizCreateDTO.getProblem()); }