Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahAbuirmeileh committed Oct 31, 2023
1 parent 426a00b commit 005f972
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/controllers/voluntaryWork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ const putFeedback = async (id: number, feedbackText: string, volunteerName: stri
const registerByVolunteer = async (workId: number, volunteerProfile: Volunteer["volunteerProfile"]) => {
try {

const voluntaryWork = await VoluntaryWork.findOne({ where: { id: workId }, relations: ["skillTags"] });
const voluntaryWork = await VoluntaryWork.findOne({ where: { id: workId }, relations: ["skillTags","volunteerProfiles"] });
if (!voluntaryWork) {
error.status = 404;
error.message = "voluntary work";
Expand Down Expand Up @@ -315,7 +315,6 @@ const registerByVolunteer = async (workId: number, volunteerProfile: Volunteer["
}

voluntaryWork.volunteerProfiles.push(volunteerProfile);

volunteerProfile.voluntaryWorks.push(voluntaryWork);

await voluntaryWork.save();
Expand Down Expand Up @@ -428,7 +427,7 @@ const generateCertificate = async (voluntaryWorkId: number, organizationName: st
volunteerName: volunteer.name,
date,
voluntaryWorkName: voluntaryWork.name,
organizationName,
organizationName:"general",
volunteerEmail: volunteer.email
}

Expand Down

0 comments on commit 005f972

Please sign in to comment.