blob: 43a620b0b529ff29d7b2266a3b3deec99c303a95 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import { db, sql, waitlist } from "@opencut/db";
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;
}
}
|