Skip to content

Commit

Permalink
fix: fourthwall orders
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldietzler committed Feb 1, 2025
1 parent af8e8bc commit f5e2fcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/repositories/database.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ export class DatabaseRepository implements IDatabaseRepository {
.$if(!!day, (qb) =>
qb.where((eb) => eb.between('createdAt', day!.minus({ days: 1 }).toJSDate(), day!.toJSDate())),
)
.$if(!week, (qb) =>
.$if(!!week, (qb) =>
qb.where((eb) => eb.between('createdAt', week!.minus({ weeks: 1 }).toJSDate(), week!.toJSDate())),
)
.$if(!month, (qb) =>
.$if(!!month, (qb) =>
qb.where((eb) => eb.between('createdAt', month!.minus({ months: 1 }).toJSDate(), month!.toJSDate())),
)
.executeTakeFirstOrThrow();
Expand Down

0 comments on commit f5e2fcb

Please sign in to comment.