Update auth.ts
This commit is contained in:
parent
4761ea510b
commit
0e0faa28b3
@ -45,8 +45,10 @@ export async function supaAuthenticateUser(
|
|||||||
} else {
|
} else {
|
||||||
normalizedApi = parseApi(token);
|
normalizedApi = parseApi(token);
|
||||||
|
|
||||||
|
console.log('normalizedApi:', normalizedApi);
|
||||||
|
|
||||||
const { data, error } = await supabase_service.rpc(
|
const { data, error } = await supabase_service.rpc(
|
||||||
'get_key_and_price_id', { api_key: normalizedApi });
|
'get_key_and_price_id_2', { api_key: normalizedApi });
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
console.error('Error fetching key and price_id:', error);
|
console.error('Error fetching key and price_id:', error);
|
||||||
@ -73,6 +75,12 @@ export async function supaAuthenticateUser(
|
|||||||
case RateLimiterMode.Scrape:
|
case RateLimiterMode.Scrape:
|
||||||
rateLimiter = scrapeRateLimit(subscriptionData.plan);
|
rateLimiter = scrapeRateLimit(subscriptionData.plan);
|
||||||
break;
|
break;
|
||||||
|
case RateLimiterMode.CrawlStatus:
|
||||||
|
rateLimiter = await getRateLimiter(RateLimiterMode.CrawlStatus, token);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
rateLimiter = await getRateLimiter(RateLimiterMode.Crawl, token);
|
||||||
|
break;
|
||||||
// case RateLimiterMode.Search:
|
// case RateLimiterMode.Search:
|
||||||
// rateLimiter = await searchRateLimiter(RateLimiterMode.Search, token);
|
// rateLimiter = await searchRateLimiter(RateLimiterMode.Search, token);
|
||||||
// break;
|
// break;
|
||||||
|
Loading…
Reference in New Issue
Block a user