The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Remove unused old env var (#41178)
Joshen Lim91209faab136
diff --git a/apps/studio/lib/api/apiHelpers.test.ts b/apps/studio/lib/api/apiHelpers.test.tsindex 5c2de3d0eb1..2caf0fdf386 100644--- a/apps/studio/lib/api/apiHelpers.test.ts+++ b/apps/studio/lib/api/apiHelpers.test.ts@@ -15,7 +15,6 @@ vi.mock('lib/constants', () => ({describe('apiHelpers', () => {describe('constructHeaders', () => {beforeEach(() => {- process.env.READ_ONLY_API_KEY = 'test-readonly-key'process.env.SUPABASE_SERVICE_KEY = 'test-service-key'})diff --git a/apps/studio/lib/api/apiHelpers.ts b/apps/studio/lib/api/apiHelpers.tsindex 2105fa452d9..b7a14da2d16 100644--- a/apps/studio/lib/api/apiHelpers.ts+++ b/apps/studio/lib/api/apiHelpers.ts@@ -25,9 +25,9 @@ export function constructHeaders(headers: { [prop: string]: any }) {)return {...cleansedHeaders,- ...(IS_PLATFORM- ? { apiKey: `${process.env.READ_ONLY_API_KEY}` }- : { apiKey: `${process.env.SUPABASE_SERVICE_KEY}` }),+ // [Joshen] JFYI both Alaister and I checked on this and realised this might not be used actually+ // Could be safe to remove but leaving it here for now+ ...(!IS_PLATFORM && { apiKey: `${process.env.SUPABASE_SERVICE_KEY}` }),}} else {return {diff --git a/apps/studio/pages/api/platform/auth/[ref]/invite.ts b/apps/studio/pages/api/platform/auth/[ref]/invite.tsindex 662df08ded0..c72ac84d295 100644--- a/apps/studio/pages/api/platform/auth/[ref]/invite.ts+++ b/apps/studio/pages/api/platform/auth/[ref]/invite.ts@@ -1,12 +1,9 @@-import { createClient } from '@supabase/supabase-js'import { NextApiRequest, NextApiResponse } from 'next'import { fetchPost } from 'data/fetchers'import { constructHeaders } from 'lib/api/apiHelpers'import apiWrapper from 'lib/api/apiWrapper'-const supabase = createClient(process.env.SUPABASE_URL!, process.env.SUPABASE_SERVICE_KEY!)-export default (req: NextApiRequest, res: NextApiResponse) => apiWrapper(req, res, handler)async function handler(req: NextApiRequest, res: NextApiResponse) {