- Timestamp:
- 09/03/21 11:25:12 (3 years ago)
- Branches:
- master
- Children:
- f8007b3
- Parents:
- 5577566
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/charitable/controller/DonationPostController.java
r5577566 rf0d5cb7 1 1 package it.finki.charitable.controller; 2 2 3 import it.finki.charitable.entities.AppUser; 4 import it.finki.charitable.entities.DonationInformation; 5 import it.finki.charitable.entities.DonationPost; 6 import it.finki.charitable.entities.FundsCollected; 3 import it.finki.charitable.entities.*; 7 4 import it.finki.charitable.services.DonationInformationService; 8 5 import it.finki.charitable.services.DonationPostService; … … 183 180 DonationInformation donationInformation = new DonationInformation(amount, post.getId(), post.getTitle()); 184 181 donationInformationService.save(donationInformation); 185 AppUser user =userService.loadUserByUsername(SecurityContextHolder.getContext().getAuthentication().getName());182 MainUser user = (MainUser) userService.loadUserByUsername(SecurityContextHolder.getContext().getAuthentication().getName()); 186 183 user.getDonationInformation().add(donationInformation); 187 184 userService.saveUser(user);
Note:
See TracChangeset
for help on using the changeset viewer.