Changeset 5306751 for src/main/java/it/finki/charitable/services
- Timestamp:
- 09/04/21 11:14:25 (3 years ago)
- Branches:
- master
- Children:
- ab49338
- Parents:
- 194776a
- Location:
- src/main/java/it/finki/charitable/services
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/charitable/services/DonationPostService.java
r194776a r5306751 41 41 } 42 42 43 public List<DonationPost> findAllByApproved(Boolean approved) { 44 return donationPostRepository.findAllByApproved(approved); 45 } 46 43 47 public void delete(DonationPost donationPost) { 44 48 donationPostRepository.delete(donationPost); -
src/main/java/it/finki/charitable/services/EmailService.java
r194776a r5306751 24 24 javaMailSender.send(message); 25 25 } 26 27 public void sendApprovalEmail(String to, String subject, Long postId) { 28 SimpleMailMessage message = new SimpleMailMessage(); 29 message.setTo(to); 30 message.setSubject(subject); 31 32 String text = "Your post has been approved\n" + "http://localhost:8080/post?postid=" + postId; 33 message.setText(text); 34 javaMailSender.send(message); 35 } 36 37 public void sendNoApprovalEmail(String to, String subject, String description) { 38 SimpleMailMessage message = new SimpleMailMessage(); 39 message.setTo(to); 40 message.setSubject(subject); 41 42 String text = "Sorry, your post hasn't been approved" + "\n" + 43 "Moderator:\n" + description; 44 message.setText(text); 45 javaMailSender.send(message); 46 } 26 47 }
Note:
See TracChangeset
for help on using the changeset viewer.