Skip to content

Commit

Permalink
bug fixes:certificate lastName issue
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenKDass committed Sep 12, 2024
1 parent e2e8e8e commit 687c5ff
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions module/userProjects/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2533,12 +2533,17 @@ module.exports = class UserProjectsHelper {
}
certificateTemplateDetails[0].issuer.kid = CERTIFICATE_ISSUER_KID;
}

let certificateUserName
if(data.userProfile.lastName && data.userProfile.lastName.length > 0){
certificateUserName = `${data.userProfile.firstName} ${data.userProfile.lastName}`
}else {
certificateUserName = `${data.userProfile.firstName}`
}
//create certificate request body
let certificateData = {
recipient : {
id : data.userId,
name : `${data.userProfile.firstName} ${data.userProfile.lastName}`,
name : certificateUserName,
type : data.userProfile.profileUserType.type
},
templateUrl : data.certificate.templateUrl,
Expand Down

0 comments on commit 687c5ff

Please sign in to comment.