-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: issue with stats count on admin panel (#618)
* fix: create a dto for the query * fix: prettier --------- Co-authored-by: orig <[email protected]>
- Loading branch information
Showing
3 changed files
with
24 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { IsOptional, IsBoolean, IsDateString, IsString, IsBooleanString, IsDate } from 'class-validator'; | ||
import { Transform } from 'class-transformer'; | ||
|
||
export class CountQueryDto { | ||
@IsOptional() | ||
@IsDate() | ||
@Transform(({ value }) => (value ? new Date(value) : null)) | ||
startDate: Date; | ||
|
||
@IsOptional() | ||
@IsDate() | ||
@Transform(({ value }) => (value ? new Date(value) : null)) | ||
endDate: Date; | ||
|
||
@IsOptional() | ||
@IsBooleanString() | ||
verified: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './find-all-query.dto'; | ||
export * from './count-query.dto'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters