From 1c35534e2a0045caa4aad29b59f887a1f066eea2 Mon Sep 17 00:00:00 2001 From: rafaelsideguide <150964962+rafaelsideguide@users.noreply.github.com> Date: Wed, 28 Aug 2024 14:18:05 -0300 Subject: [PATCH] fix(v1): check-status for preview --- apps/api/src/controllers/auth.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/api/src/controllers/auth.ts b/apps/api/src/controllers/auth.ts index 19852078..36a2ca23 100644 --- a/apps/api/src/controllers/auth.ts +++ b/apps/api/src/controllers/auth.ts @@ -132,7 +132,11 @@ export async function supaAuthenticateUser( let priceId: string | null = null; if (token == "this_is_just_a_preview_token") { - rateLimiter = getRateLimiter(RateLimiterMode.Preview, token); + if (mode == RateLimiterMode.CrawlStatus) { + rateLimiter = getRateLimiter(RateLimiterMode.CrawlStatus, token); + } else { + rateLimiter = getRateLimiter(RateLimiterMode.Preview, token); + } teamId = "preview"; } else { normalizedApi = parseApi(token);