Skip to content

Commit

Permalink
feat: geContributionList add owner id
Browse files Browse the repository at this point in the history
  • Loading branch information
KieSun committed Nov 27, 2023
1 parent d24b53f commit 0ee8c47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/service/contribution.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ export class ContributionService {
constructor(private prisma: PrismaService, private easService: EasService) {}

async getContributionList(query: ContributionListQuery) {
const { projectId, currentPage, pageSize } = query;
const { projectId, currentPage, pageSize, ownerId = '' } = query;
return paginate(
this.prisma.contribution,
{
where: {
deleted: false,
projectId,
ownerId,
},
},
{
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 @@ -15,6 +15,11 @@ export class ContributionListQuery extends PaginateQuery {
@IsString()
@ApiProperty({ type: 'string' })
projectId: string;

@IsNotEmpty()
@IsString()
@ApiProperty({ type: 'string' })
ownerId: string;
}

export class UpdateContributionStateBody extends AuthBody {
Expand Down

0 comments on commit 0ee8c47

Please sign in to comment.