Skip to content

Commit

Permalink
Merge pull request #98 from Donut-DONationUTile/feature/fcm
Browse files Browse the repository at this point in the history
chore: message custom
  • Loading branch information
Ganghee-Lee-0522 authored May 1, 2024
2 parents bef70dd + 7149ec5 commit 9855c15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/zero/eight/donut/service/FcmService.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,19 @@ public List<String> immminentGift() throws FirebaseMessagingException {

public String mock37(String email, String product) throws FirebaseMessagingException {
Giver giver = giverRepository.findByEmail(email).orElseThrow();
fcmUtils.sendMessage(giver.getId(), "wallet: D-37", "Your item" + product + "is expiring soon! It will be automatically donated.");
fcmUtils.sendMessage(giver.getId(), "[DONUT] D-37", "Your item" + product + "is expiring soon! It will be automatically donated.");
return "fcmReceiver: " + email + "(ROLE_GIVER), fcm title: wallet: D-37, fcm body: Your item" + product + "is expiring soon! It will be automatically donated.";
}

public String mock30(String email, String product) throws FirebaseMessagingException {
Giver giver = giverRepository.findByEmail(email).orElseThrow();
fcmUtils.sendMessage(giver.getId(), "wallet: D-30", "Your item" + product + "is donated now!");
fcmUtils.sendMessage(giver.getId(), "[DONUT] D-30", "Your item" + product + "is donated now!");
return "fcmReceiver: " + giver.getName() + "(ROLE_GIVER), fcm title: wallet: D-30, fcm body: Your item" + product + "is donated now!";
}

public String mock7(String name, String store) throws FirebaseMessagingException {
Receiver receiver = receiverRepository.findByName(name).orElseThrow();
fcmUtils.sendMessage(receiver.getId(), "giftbox: D-7", "Your gift box is expiring soon! You can use it at" + store + ".");
fcmUtils.sendMessage(receiver.getId(), "[DONUT] D-7", "Your gift box is expiring soon! You can use it at" + store + ".");
return "fcmReceiver: " + receiver.getName() + "(ROLE_RECEIVER), fcm title: giftbox: D-7, fcm body: Your gift box is expiring soon! You can use it at" + store + ".";
}
}

0 comments on commit 9855c15

Please sign in to comment.