Skip to content

Commit

Permalink
fix(orders): get the correct unreviewed order
Browse files Browse the repository at this point in the history
  • Loading branch information
Veirt committed Dec 8, 2024
1 parent 9dd391b commit 3e5b2f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/module/order/order.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
tutories as tutoriesTable,
tutors,
} from "@/db/schema";
import { and, eq, desc, inArray, lte, isNotNull } from "drizzle-orm";
import { and, desc, eq, inArray, isNull, lte } from "drizzle-orm";

export class OrderRepository {
constructor(private readonly db: typeof dbType) {}
Expand Down Expand Up @@ -59,7 +59,7 @@ export class OrderRepository {
}

if (typeof unreviewed === "boolean" && unreviewed) {
conditions.push(isNotNull(orders.reviewDismissedAt));
conditions.push(isNull(orders.reviewDismissedAt));
}

if (tutorId) {
Expand Down

0 comments on commit 3e5b2f3

Please sign in to comment.