Beneficiary must be able to add to favorite a Call

This commit is contained in:
harish
2024-10-14 15:39:34 +05:30
parent ee59ae10c4
commit 82bf9ff789
18 changed files with 610 additions and 4 deletions

View File

@@ -269,6 +269,14 @@ public class UserDao {
.orElseThrow(() -> new ResourceNotFoundException(Status.NOT_FOUND,
Translator.toLocale(GepafinConstant.USER_NOT_FOUND_MSG)));
}
public UserEntity getUserByBeneficiaryId(Long beneficiaryId) {
UserEntity user = userRepository.findByBeneficiaryId(beneficiaryId);
if (user == null) {
throw new ResourceNotFoundException(Status.NOT_FOUND,
Translator.toLocale(GepafinConstant.USER_NOT_FOUND_WITH_BENEFICIARYID_MSG));
}
return user;
}
public String initiatePasswordReset(InitiatePasswordResetReq resetReq) {
UserEntity user = userRepository.findByEmail(resetReq.getEmail());