mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
feat: top genres report
This commit is contained in:
parent
62119d44b0
commit
a0c28e2324
21 changed files with 317 additions and 104 deletions
|
|
@ -6,6 +6,7 @@ import { ListenReportDto } from "./dto/listen-report.dto";
|
|||
import { ReportTimeDto } from "./dto/report-time.dto";
|
||||
import { TopAlbumsReportDto } from "./dto/top-albums-report.dto";
|
||||
import { TopArtistsReportDto } from "./dto/top-artists-report.dto";
|
||||
import { TopGenresReportDto } from "./dto/top-genres-report.dto";
|
||||
import { TopTracksReportDto } from "./dto/top-tracks-report.dto";
|
||||
import { ReportsService } from "./reports.service";
|
||||
import { Timeframe } from "./timeframe.enum";
|
||||
|
|
@ -50,4 +51,13 @@ export class ReportsController {
|
|||
): Promise<TopTracksReportDto> {
|
||||
return this.reportsService.getTopTracks({ user, time });
|
||||
}
|
||||
|
||||
@Get("top-genres")
|
||||
@AuthAccessToken()
|
||||
async getTopGenres(
|
||||
@Query() time: ReportTimeDto,
|
||||
@ReqUser() user: User
|
||||
): Promise<TopGenresReportDto> {
|
||||
return this.reportsService.getTopGenres({ user, time });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue