mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
refactor: use TimeOptions for Listens report
This commit is contained in:
parent
5bc76f23d0
commit
67ea28aec7
7 changed files with 51 additions and 59 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { IsEnum, IsISO8601 } from "class-validator";
|
||||
import { IsEnum, ValidateNested } from "class-validator";
|
||||
import { User } from "../../users/user.entity";
|
||||
import { Timeframe } from "../timeframe.enum";
|
||||
import { ReportTimeDto } from "./report-time.dto";
|
||||
|
||||
export class GetListenReportDto {
|
||||
user: User;
|
||||
|
|
@ -8,9 +9,6 @@ export class GetListenReportDto {
|
|||
@IsEnum(Timeframe)
|
||||
timeFrame: Timeframe;
|
||||
|
||||
@IsISO8601()
|
||||
timeStart: string;
|
||||
|
||||
@IsISO8601()
|
||||
timeEnd: string;
|
||||
@ValidateNested()
|
||||
time: ReportTimeDto;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,4 @@ export class ListenReportDto {
|
|||
date: string;
|
||||
count: number;
|
||||
}[];
|
||||
|
||||
timeFrame: Timeframe;
|
||||
|
||||
timeStart: string;
|
||||
|
||||
timeEnd: string;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue