refactor: remove all waitlist-related code

This commit is contained in:
Maze Winther
2025-08-02 17:28:01 +02:00
parent ae54aff1a9
commit c8980de41a
6 changed files with 5 additions and 192 deletions
+3 -3
View File
@@ -8,9 +8,9 @@ const redis = new Redis({
token: env.UPSTASH_REDIS_REST_TOKEN,
});
export const waitlistRateLimit = new Ratelimit({
export const baseRateLimit = new Ratelimit({
redis,
limiter: Ratelimit.slidingWindow(5, "1 m"), // 5 requests per minute
limiter: Ratelimit.slidingWindow(100, "1 m"), // 100 requests per minute
analytics: true,
prefix: "waitlist-rate-limit",
prefix: "rate-limit",
});
-13
View File
@@ -1,13 +0,0 @@
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;
}
}