fix data flow issues
This commit is contained in:
@@ -29,6 +29,9 @@ import { GetLeagueOwnerSummaryQueryDTO } from './dtos/GetLeagueOwnerSummaryQuery
|
||||
import { GetLeagueAdminConfigQueryDTO } from './dtos/GetLeagueAdminConfigQueryDTO';
|
||||
import { GetLeagueProtestsQueryDTO } from './dtos/GetLeagueProtestsQueryDTO';
|
||||
import { GetLeagueSeasonsQueryDTO } from './dtos/GetLeagueSeasonsQueryDTO';
|
||||
import { GetLeagueWalletOutputDTO } from './dtos/GetLeagueWalletOutputDTO';
|
||||
import { WithdrawFromLeagueWalletInputDTO } from './dtos/WithdrawFromLeagueWalletInputDTO';
|
||||
import { WithdrawFromLeagueWalletOutputDTO } from './dtos/WithdrawFromLeagueWalletOutputDTO';
|
||||
|
||||
@ApiTags('leagues')
|
||||
@Controller('leagues')
|
||||
@@ -274,4 +277,22 @@ export class LeagueController {
|
||||
async getRaces(@Param('leagueId') leagueId: string): Promise<GetLeagueRacesOutputDTO> {
|
||||
return this.leagueService.getRaces(leagueId);
|
||||
}
|
||||
|
||||
@Get(':leagueId/wallet')
|
||||
@ApiOperation({ summary: 'Get league wallet information' })
|
||||
@ApiResponse({ status: 200, description: 'League wallet data', type: GetLeagueWalletOutputDTO })
|
||||
async getLeagueWallet(@Param('leagueId') leagueId: string): Promise<GetLeagueWalletOutputDTO> {
|
||||
return this.leagueService.getLeagueWallet(leagueId);
|
||||
}
|
||||
|
||||
@Post(':leagueId/wallet/withdraw')
|
||||
@ApiOperation({ summary: 'Withdraw from league wallet' })
|
||||
@ApiBody({ type: WithdrawFromLeagueWalletInputDTO })
|
||||
@ApiResponse({ status: 200, description: 'Withdrawal processed', type: WithdrawFromLeagueWalletOutputDTO })
|
||||
async withdrawFromLeagueWallet(
|
||||
@Param('leagueId') leagueId: string,
|
||||
@Body() input: WithdrawFromLeagueWalletInputDTO,
|
||||
): Promise<WithdrawFromLeagueWalletOutputDTO> {
|
||||
return this.leagueService.withdrawFromLeagueWallet(leagueId, input);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user