mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-13 04:49:08 +08:00
Update auth.ts
This commit is contained in:
parent
558acffb33
commit
6ab6ef9004
@ -16,7 +16,20 @@ import { getValue } from "../services/redis";
|
||||
import { setValue } from "../services/redis";
|
||||
import { validate } from "uuid";
|
||||
import * as Sentry from "@sentry/node";
|
||||
|
||||
// const { data, error } = await supabase_service
|
||||
// .from('api_keys')
|
||||
// .select(`
|
||||
// key,
|
||||
// team_id,
|
||||
// teams (
|
||||
// subscriptions (
|
||||
// price_id
|
||||
// )
|
||||
// )
|
||||
// `)
|
||||
// .eq('key', normalizedApi)
|
||||
// .limit(1)
|
||||
// .single();
|
||||
function normalizedApiIsUuid(potentialUuid: string): boolean {
|
||||
// Check if the string is a valid UUID
|
||||
return validate(potentialUuid);
|
||||
@ -154,7 +167,7 @@ export async function supaAuthenticateUser(
|
||||
await setValue(
|
||||
cacheKey,
|
||||
JSON.stringify({ team_id: teamId, price_id: priceId }),
|
||||
10
|
||||
60
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user