From 79d72b6f4c43ac87e1497ef34b48084d7d071616 Mon Sep 17 00:00:00 2001 From: KieSun Date: Tue, 23 Jul 2024 21:03:36 +0800 Subject: [PATCH] feat: createContribution body --- src/core/service/contribution.service.ts | 2 ++ src/core/type/doc/contribution.ts | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/core/service/contribution.service.ts b/src/core/service/contribution.service.ts index 284131c..d3985be 100644 --- a/src/core/service/contribution.service.ts +++ b/src/core/service/contribution.service.ts @@ -181,6 +181,7 @@ export class ContributionService { type, startDate, endDate, + imageList = [], } = body; const project = await this.prisma.project.findFirst({ where: { @@ -216,6 +217,7 @@ export class ContributionService { endDate: new Date(endDate), ownerId: operatorId, id, + imageList, }, }); } diff --git a/src/core/type/doc/contribution.ts b/src/core/type/doc/contribution.ts index 7fd894e..a913fe1 100644 --- a/src/core/type/doc/contribution.ts +++ b/src/core/type/doc/contribution.ts @@ -89,6 +89,11 @@ export class CreateContributionBody extends AuthBody { @Type(() => Number) @ApiProperty({ type: 'number' }) endDate: number; + + @IsOptional() + @IsArray() + @ApiProperty({ isArray: true }) + imageList?: string[]; } export class PrepareClaimBody {