diff --git a/apps/api/src/campaign-application/campaign-application.module.ts b/apps/api/src/campaign-application/campaign-application.module.ts index 7836edfa..447493ff 100644 --- a/apps/api/src/campaign-application/campaign-application.module.ts +++ b/apps/api/src/campaign-application/campaign-application.module.ts @@ -7,6 +7,6 @@ import { OrganizerService } from '../organizer/organizer.service' @Module({ imports: [PrismaModule], controllers: [CampaignApplicationController], - providers: [CampaignApplicationService,PersonService,OrganizerService], + providers: [CampaignApplicationService, PersonService, OrganizerService], }) export class CampaignApplicationModule {} diff --git a/apps/api/src/campaign-application/campaign-application.service.ts b/apps/api/src/campaign-application/campaign-application.service.ts index 19d0a17c..2952e469 100644 --- a/apps/api/src/campaign-application/campaign-application.service.ts +++ b/apps/api/src/campaign-application/campaign-application.service.ts @@ -32,26 +32,26 @@ export class CampaignApplicationService { }) } - const sanitizedData = { - campaignName: createCampaignApplicationDto.campaignName.trim(), - organizerName: createCampaignApplicationDto.organizerName.trim(), - organizerEmail: createCampaignApplicationDto.organizerEmail.trim(), - organizerPhone: createCampaignApplicationDto.organizerPhone.trim(), - beneficiary: createCampaignApplicationDto.beneficiary.trim(), - organizerBeneficiaryRel: createCampaignApplicationDto.organizerBeneficiaryRel.trim(), - goal: createCampaignApplicationDto.goal.trim(), - history: createCampaignApplicationDto.history?.trim(), - amount: createCampaignApplicationDto.amount.trim(), - description: createCampaignApplicationDto.description?.trim(), - campaignGuarantee: createCampaignApplicationDto.campaignGuarantee?.trim(), - otherFinanceSources: createCampaignApplicationDto.otherFinanceSources?.trim(), - otherNotes: createCampaignApplicationDto.otherNotes?.trim(), + const campaingApplicationData = { + campaignName: createCampaignApplicationDto.campaignName, + organizerName: createCampaignApplicationDto.organizerName, + organizerEmail: createCampaignApplicationDto.organizerEmail, + organizerPhone: createCampaignApplicationDto.organizerPhone, + beneficiary: createCampaignApplicationDto.beneficiary, + organizerBeneficiaryRel: createCampaignApplicationDto.organizerBeneficiaryRel, + goal: createCampaignApplicationDto.goal, + history: createCampaignApplicationDto.history, + amount: createCampaignApplicationDto.amount, + description: createCampaignApplicationDto.description, + campaignGuarantee: createCampaignApplicationDto.campaignGuarantee, + otherFinanceSources: createCampaignApplicationDto.otherFinanceSources, + otherNotes: createCampaignApplicationDto.otherNotes, category: createCampaignApplicationDto.category, organizerId: organizer.id, } const newCampaignApplication = await this.prisma.campaignApplication.create({ - data: sanitizedData, + data: campaingApplicationData, }) return newCampaignApplication