Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backend/src/entities/user/user.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ export class UserRepository extends Repository<User> {
}

private withRecentLocationsOnly(): this {
const sixHoursAgo = new Date(Date.now() - 6 * 60 * 60 * 1000);
const h24HoursAgo = new Date(Date.now() - 24 * 60 * 60 * 1000);
this.queryBuilder.andWhere(
`
user.locationLastTimeUpdated IS NOT NULL
AND user.locationLastTimeUpdated >= :sixHoursAgo
AND user.locationLastTimeUpdated >= :h24HoursAgo
`,
{ sixHoursAgo },
{ h24HoursAgo },
);
return this;
}
Expand Down
Loading