v28
This commit is contained in:
@@ -119,20 +119,23 @@ export class LeaguesController {
|
||||
|
||||
/**
|
||||
* GET /leagues/teams/:id/matches
|
||||
* Get team's recent matches
|
||||
* Get team's recent matches (paginated)
|
||||
*/
|
||||
@Get("teams/:id/matches")
|
||||
@Public()
|
||||
@ApiOperation({ summary: "Get team's recent matches" })
|
||||
@ApiOperation({ summary: "Get team's recent matches (paginated)" })
|
||||
@ApiParam({ name: "id", description: "Team ID" })
|
||||
@ApiQuery({ name: "limit", required: false, type: Number })
|
||||
@ApiQuery({ name: "page", required: false, type: Number, description: "Page number (default: 1)" })
|
||||
@ApiQuery({ name: "limit", required: false, type: Number, description: "Items per page (default: 20)" })
|
||||
async getTeamMatches(
|
||||
@Param("id") id: string,
|
||||
@Query("page") page?: string,
|
||||
@Query("limit") limit?: string,
|
||||
) {
|
||||
return this.leaguesService.getTeamRecentMatches(
|
||||
id,
|
||||
parseInt(limit || "10", 10),
|
||||
parseInt(page || "1", 10),
|
||||
parseInt(limit || "20", 10),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user