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

@ -100,13 +100,9 @@ export class ReportsService {
async getTopArtists(
options: GetTopArtistsReportDto
): Promise<TopArtistsReportDto> {
const { user, timePreset, customTimeStart, customTimeEnd } = options;
const { user, time: timePreset } = options;
const interval = this.getIntervalFromPreset({
timePreset,
customTimeStart,
customTimeEnd,
});
const interval = this.getIntervalFromPreset(timePreset);
const getArtistsWithCountQB = this.listensService
.getScopedQueryBuilder()