Skip to content

Commit

Permalink
feat: 알림 수정
Browse files Browse the repository at this point in the history
1.fcm 프로젝트 변경
2.안드로이드에 넘기는 퀴즈 body 값 변경
  • Loading branch information
Doncham committed Sep 11, 2024
1 parent ca445de commit 40bba3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ public ResponseEntity<Object> 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());
}


Expand Down

0 comments on commit 40bba3a

Please sign in to comment.