Skip to content
Merged
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
12 changes: 12 additions & 0 deletions src/reports/topgear/topgear-reports.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ export class TopgearReportsController {
@Scopes(AppScopes.AllReports, AppScopes.TopgearChallengeStatsByUser)
@ApiBearerAuth()
@ApiOperation({ summary: "Get challenge stats per user" })
@ApiQuery({
name: "start_date",
required: false,
type: Date,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using a more specific type for the start_date query parameter, such as string with a format description, since Date might not be directly applicable in the context of query parameters.

description: "Start date",
})
@ApiQuery({
name: "end_date",
required: false,
type: Date,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using a more specific type for the end_date query parameter, such as string with a format description, since Date might not be directly applicable in the context of query parameters.

description: "End date",
})
async getChallengeStatsByUser(
@Query("start_date") startDate?: string,
@Query("end_date") endDate?: string,
Expand Down