mirror of
https://github.com/apricote/Listory.git
synced 2026-02-07 10:17:02 +00:00
feat: implement long-lived sessions
This commit is contained in:
parent
d0705afca8
commit
44f7e26270
35 changed files with 739 additions and 190 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { Controller, Get, Query } from "@nestjs/common";
|
||||
import { Auth } from "../auth/decorators/auth.decorator";
|
||||
import { AuthAccessToken } from "../auth/decorators/auth-access-token.decorator";
|
||||
import { ReqUser } from "../auth/decorators/req-user.decorator";
|
||||
import { User } from "../users/user.entity";
|
||||
import { ListenReportDto } from "./dto/listen-report.dto";
|
||||
|
|
@ -13,7 +13,7 @@ export class ReportsController {
|
|||
constructor(private readonly reportsService: ReportsService) {}
|
||||
|
||||
@Get("listens")
|
||||
@Auth()
|
||||
@AuthAccessToken()
|
||||
async getListens(
|
||||
@Query() time: ReportTimeDto,
|
||||
@Query("timeFrame") timeFrame: Timeframe,
|
||||
|
|
@ -23,7 +23,7 @@ export class ReportsController {
|
|||
}
|
||||
|
||||
@Get("top-artists")
|
||||
@Auth()
|
||||
@AuthAccessToken()
|
||||
async getTopArtists(
|
||||
@Query() time: ReportTimeDto,
|
||||
@ReqUser() user: User
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue