From f3cf63e4bb1c9570bff6633677d546bd2686cf82 Mon Sep 17 00:00:00 2001 From: tresjo81 Date: Fri, 25 Sep 2026 20:57:25 +0000 Subject: [PATCH 1/2] fix(bounties): add ParseUUIDPipe validation to repositoryId query param (#356) --- src/bounties/bounties.controller.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bounties/bounties.controller.ts b/src/bounties/bounties.controller.ts index 752f28d..e23b839 100644 --- a/src/bounties/bounties.controller.ts +++ b/src/bounties/bounties.controller.ts @@ -68,7 +68,11 @@ export class BountiesController { difficulty?: BountyDifficulty, @Query('asset', new ParseEnumPipe(AssetType, { optional: true })) asset?: AssetType, - @Query('repositoryId') repositoryId?: string, + @Query( + 'repositoryId', + new ParseUUIDPipe({ version: '4', optional: true }), + ) + repositoryId?: string, @Query('primaryLanguage') primaryLanguage?: string, ) { return this.bountiesService.list({ From ff5972b5a80e5638baadd66d6244f2cfcb7eda78 Mon Sep 17 00:00:00 2001 From: tresjo81 Date: Sat, 26 Sep 2026 03:20:35 +0000 Subject: [PATCH 2/2] fix(dto): require sponsorId and createdById in milestone, pool, and team DTOs (#357) --- src/maintenance-pool/dto/create-pool.dto.ts | 5 ++--- src/milestones/dto/create-milestone.dto.ts | 5 ++--- src/teams/dto/create-team.dto.ts | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/maintenance-pool/dto/create-pool.dto.ts b/src/maintenance-pool/dto/create-pool.dto.ts index 5f428f5..f89b45d 100644 --- a/src/maintenance-pool/dto/create-pool.dto.ts +++ b/src/maintenance-pool/dto/create-pool.dto.ts @@ -17,10 +17,9 @@ export class CreatePoolDto { @IsUUID() repositoryId?: string; - @ApiProperty({ required: false }) - @IsOptional() + @ApiProperty() @IsUUID() - createdById?: string; + createdById: string; /** The sponsor's standing recurring commitment; deposits never overwrite it (#93). */ @ApiProperty({ required: false }) diff --git a/src/milestones/dto/create-milestone.dto.ts b/src/milestones/dto/create-milestone.dto.ts index 11bf599..095f1cb 100644 --- a/src/milestones/dto/create-milestone.dto.ts +++ b/src/milestones/dto/create-milestone.dto.ts @@ -18,10 +18,9 @@ export class CreateMilestoneDto { @IsUUID() repositoryId: string; - @ApiProperty({ required: false }) - @IsOptional() + @ApiProperty() @IsUUID() - sponsorId?: string; + sponsorId: string; @ApiProperty({ maxLength: 200 }) @IsString() diff --git a/src/teams/dto/create-team.dto.ts b/src/teams/dto/create-team.dto.ts index 75acea8..ac6af8d 100644 --- a/src/teams/dto/create-team.dto.ts +++ b/src/teams/dto/create-team.dto.ts @@ -44,10 +44,9 @@ export class CreateTeamDto { @MaxLength(100) name: string; - @ApiProperty({ required: false }) - @IsOptional() + @ApiProperty() @IsUUID() - createdById?: string; + createdById: string; @ApiProperty({ type: [TeamMemberSplitDto] }) @ArrayMinSize(1)