Ignore:
Timestamp:
09/04/21 12:17:17 (3 years ago)
Author:
KostaFortumanov <kfortumanov@…>
Branches:
master
Children:
0f4f552
Parents:
5306751
Message:

Dodadeno prijavuvanje na objavi

Location:
src/main/java/it/finki/charitable/services
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/it/finki/charitable/services/DonationPostService.java

    r5306751 rab49338  
    33import it.finki.charitable.entities.AppUser;
    44import it.finki.charitable.entities.DonationPost;
     5import it.finki.charitable.entities.Moderator;
    56import it.finki.charitable.repository.DonationPostRepository;
    67import org.springframework.data.domain.Page;
     
    4546    }
    4647
     48    public List<DonationPost> findAllByModerator(Moderator moderator) {
     49        return donationPostRepository.findAllByModerator(moderator);
     50    }
     51
    4752    public void delete(DonationPost donationPost) {
    4853        donationPostRepository.delete(donationPost);
  • src/main/java/it/finki/charitable/services/EmailService.java

    r5306751 rab49338  
    4040        message.setSubject(subject);
    4141
    42         String text = "Sorry, your post hasn't been approved" + "\n" +
     42        String text = "Sorry, your post hasn't been approved\n" +
     43                "Moderator:\n" + description;
     44        message.setText(text);
     45        javaMailSender.send(message);
     46    }
     47
     48    public void sendDeletionEmail(String to, String subject, String description) {
     49        SimpleMailMessage message = new SimpleMailMessage();
     50        message.setTo(to);
     51        message.setSubject(subject);
     52
     53        String text = "Sorry, your post has been deleted\n" +
    4354                "Moderator:\n" + description;
    4455        message.setText(text);
Note: See TracChangeset for help on using the changeset viewer.