Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/bounties/bounties.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Req,
UseGuards,
} from '@nestjs/common';
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { ApiProperty, ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { Throttle } from '@nestjs/throttler'; // Import the Throttle decorator
import { BountiesService } from './bounties.service';
import { CreateBountyDto } from './dto/create-bounty.dto';
Expand All @@ -29,6 +29,7 @@ import {
} from '../common/swagger/api-common-responses.decorator';

class FundBountyDto {
@ApiProperty({ description: 'Stellar public key of the funding sponsor' })
@IsStellarAddress()
funderAddress: string;
}
Expand Down
8 changes: 7 additions & 1 deletion src/maintenance-pool/maintenance-pool.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Post,
UseGuards,
} from '@nestjs/common';
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { ApiProperty, ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { Throttle } from '@nestjs/throttler';
import { IsOptional, IsUUID } from 'class-validator';
import { MaintenancePoolService } from './maintenance-pool.service';
Expand All @@ -25,23 +25,29 @@ import {
} from '../common/swagger/api-common-responses.decorator';

class DepositDto {
@ApiProperty({ description: 'Amount to deposit into the maintenance pool' })
@IsMoneyAmount()
amount: string;

@ApiProperty({ description: 'Stellar public key of the funder depositing into the pool' })
@IsStellarAddress()
funderAddress: string;
}

class AssignRewardDto {
@ApiProperty({ description: 'ID of the issue being rewarded' })
@IsUUID()
issueId: string;

@ApiProperty({ description: 'Reward amount allocated from the maintenance pool' })
@IsMoneyAmount()
amount: string;

@ApiProperty({ description: 'Stellar public key of the reward recipient' })
@IsStellarAddress()
recipientAddress: string;

@ApiProperty({ required: false, description: 'Optional internal user ID of the recipient' })
@IsOptional()
@IsUUID()
recipientId?: string;
Expand Down
5 changes: 4 additions & 1 deletion src/milestones/milestones.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Req,
UseGuards,
} from '@nestjs/common';
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { ApiProperty, ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
import { IsOptional, IsUUID } from 'class-validator';
import { Throttle } from '@nestjs/throttler';
import { MilestonesService } from './milestones.service';
Expand All @@ -26,14 +26,17 @@ import {
} from '../common/swagger/api-common-responses.decorator';

class FundMilestoneDto {
@ApiProperty({ description: 'Stellar public key of the funding sponsor' })
@IsStellarAddress()
funderAddress!: string;
}

class ResolveIssueDto {
@ApiProperty({ description: 'Stellar public key of the recipient' })
@IsStellarAddress()
recipientAddress!: string;

@ApiProperty({ required: false, description: 'Optional internal user ID of the recipient' })
@IsOptional()
@IsUUID()
recipientId?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/users/users.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Patch,
UseGuards,
} from '@nestjs/common';
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
import { ApiProperty, ApiBearerAuth, ApiTags } from '@nestjs/swagger';
import { UsersService } from './users.service';
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
import { IsStellarAddress } from '../common/validators/stellar-address.validator';
Expand Down