Skip to content

Commit

Permalink
resolve skill issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhorner committed Sep 15, 2024
1 parent 269d846 commit 0277c27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/tracks/tracks.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ export class TracksService {
list(filters: TrackFilters = {}): Promise<Track[]> {
const query = this.tracksRepository.createQueryBuilder("track")

if (filters.start > filters.end) {
if (
filters.start &&
filters.end &&
new Date(filters.start) > new Date(filters.end)
) {
throw new HttpException("start must be less than or equal to end", 400)
}

Expand Down

0 comments on commit 0277c27

Please sign in to comment.