Skip to content

Commit

Permalink
feat: createContribution body
Browse files Browse the repository at this point in the history
  • Loading branch information
KieSun committed Jul 23, 2024
1 parent 6b9e2a6 commit 79d72b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/service/contribution.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export class ContributionService {
type,
startDate,
endDate,
imageList = [],
} = body;
const project = await this.prisma.project.findFirst({
where: {
Expand Down Expand Up @@ -216,6 +217,7 @@ export class ContributionService {
endDate: new Date(endDate),
ownerId: operatorId,
id,
imageList,
},
});
}
Expand Down
5 changes: 5 additions & 0 deletions src/core/type/doc/contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 79d72b6

Please sign in to comment.