blob: 7b67258bf62b0cffc4310dcdb9700bb41ac82ed9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import { db, sql } from "@opencut/db";
import { waitlist } from "@opencut/db/schema";
export async function getWaitlistCount() {
try {
const result = await db
.select({ count: sql<number>`count(*)` })
.from(waitlist);
return result[0]?.count || 0;
} catch (error) {
console.error("Failed to fetch waitlist count:", error);
return 0;
}
}
|