From 6ab6ef900414fea9cf07b4627941b107097cc1a5 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 26 Aug 2024 19:57:27 -0300 Subject: [PATCH] Update auth.ts --- apps/api/src/controllers/auth.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/apps/api/src/controllers/auth.ts b/apps/api/src/controllers/auth.ts index d7edab20..120cc604 100644 --- a/apps/api/src/controllers/auth.ts +++ b/apps/api/src/controllers/auth.ts @@ -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) {