diff options
| author | ANAGO Ronnel <ronnel.anago@external.grtgaz.com> | 2025-06-26 02:51:17 +0200 |
|---|---|---|
| committer | ANAGO Ronnel <ronnel.anago@external.grtgaz.com> | 2025-06-26 02:51:17 +0200 |
| commit | ebb3456c1040da3457b5d939ee3d62d0770763b2 (patch) | |
| tree | 089cf92220aea73048fd081f553e08ba0ac9f0f5 | |
| parent | a8d6bbd03a4c5a89075d75ea37b61afa5efe373a (diff) | |
| download | opencut-ebb3456c1040da3457b5d939ee3d62d0770763b2.tar.gz | |
refactor: update imports in waitlist API and library to ensure consistent usage of drizzle-orm functions
| -rw-r--r-- | apps/web/src/app/api/waitlist/route.ts | 3 | ||||
| -rw-r--r-- | apps/web/src/lib/waitlist.ts | 3 | ||||
| -rw-r--r-- | packages/db/src/index.ts | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/apps/web/src/app/api/waitlist/route.ts b/apps/web/src/app/api/waitlist/route.ts index 0632616b..f6f81103 100644 --- a/apps/web/src/app/api/waitlist/route.ts +++ b/apps/web/src/app/api/waitlist/route.ts @@ -1,7 +1,6 @@ import { NextRequest, NextResponse } from "next/server";
-import { db } from "@opencut/db";
+import { db, eq } from "@opencut/db";
import { waitlist } from "@opencut/db/schema";
-import { eq } from "drizzle-orm";
import { nanoid } from "nanoid";
import { waitlistRateLimit } from "@/lib/rate-limit";
import { z } from "zod";
diff --git a/apps/web/src/lib/waitlist.ts b/apps/web/src/lib/waitlist.ts index c01347d8..7b67258b 100644 --- a/apps/web/src/lib/waitlist.ts +++ b/apps/web/src/lib/waitlist.ts @@ -1,6 +1,5 @@ -import { db } from "@opencut/db";
+import { db, sql } from "@opencut/db";
import { waitlist } from "@opencut/db/schema";
-import { sql } from "drizzle-orm";
export async function getWaitlistCount() {
try {
diff --git a/packages/db/src/index.ts b/packages/db/src/index.ts index b712776c..91fc841d 100644 --- a/packages/db/src/index.ts +++ b/packages/db/src/index.ts @@ -13,4 +13,7 @@ const client = postgres(process.env.DATABASE_URL); export const db = drizzle(client, { schema }); // Re-export schema for convenience -export * from "./schema";
\ No newline at end of file +export * from "./schema"; + +// Re-export drizzle-orm functions to ensure version consistency +export { eq, and, or, not, isNull, isNotNull, inArray, notInArray, exists, notExists, sql } from "drizzle-orm";
\ No newline at end of file |
