From 174942a98ace081053d4962130d769d789aa0986 Mon Sep 17 00:00:00 2001 From: Sarah Abu irmeileh <211027@ppu.edu.ps> Date: Tue, 31 Oct 2023 14:05:54 +0200 Subject: [PATCH] Testing --- src/controllers/voluntaryWork.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/controllers/voluntaryWork.ts b/src/controllers/voluntaryWork.ts index 50ce863..b9081f8 100644 --- a/src/controllers/voluntaryWork.ts +++ b/src/controllers/voluntaryWork.ts @@ -314,11 +314,7 @@ const registerByVolunteer = async (workId: number, volunteerProfile: Volunteer[" throw error; } - if (voluntaryWork.volunteerProfiles) { - voluntaryWork.volunteerProfiles.push(volunteerProfile); - } else { - voluntaryWork.volunteerProfiles = [volunteerProfile]; - } + voluntaryWork.volunteerProfiles.push(volunteerProfile); if (volunteerProfile.voluntaryWorks) { volunteerProfile.voluntaryWorks.push(voluntaryWork);