refator: use TimeOptions for TopArtists report

This commit is contained in:
Julian Tölle 2020-07-12 17:16:33 +02:00
parent ad0d197105
commit 5bc76f23d0
9 changed files with 62 additions and 46 deletions

View file

@ -24,9 +24,9 @@ export class ReportsController {
@Get("top-artists")
@Auth()
async getTopArtists(
@Query() options: Omit<GetTopArtistsReportDto, "user">,
@Query() time: ReportTimeDto,
@ReqUser() user: User
): Promise<TopArtistsReportDto> {
return this.reportsService.getTopArtists({ ...options, user });
return this.reportsService.getTopArtists({ user, time });
}
}