This commit is contained in:
Nicolas 2024-06-06 12:05:20 -07:00
parent de06b13deb
commit c2ad358390
2 changed files with 2 additions and 9 deletions

View File

@ -130,7 +130,7 @@ export async function supaAuthenticateUser(
}
}
const team_endpoint_token = team_id;
const team_endpoint_token = token === "this_is_just_a_preview_token" ? iptoken : team_id;
try {
await rateLimiter.consume(team_endpoint_token);

View File

@ -67,18 +67,11 @@ const createRateLimiter = (keyPrefix, points) =>
duration: 60, // Duration in seconds
});
export const previewRateLimiter = createRateLimiter(
"preview",
RATE_LIMITS.preview.default
);
export const serverRateLimiter = createRateLimiter(
"server",
RATE_LIMITS.account.default
);
export const crawlStatusRateLimiter = createRateLimiter(
"crawl-status",
RATE_LIMITS.crawlStatus.default
);
export const testSuiteRateLimiter = createRateLimiter(
"test-suite",
RATE_LIMITS.testSuite.default