The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: custom headers on post options param
phamhieube8396a51e8f
diff --git a/studio/pages/api/auth/[ref]/invite.ts b/studio/pages/api/auth/[ref]/invite.tsindex b576d7ae430..e8d0b15d218 100644--- a/studio/pages/api/auth/[ref]/invite.ts+++ b/studio/pages/api/auth/[ref]/invite.ts@@ -22,10 +22,9 @@ const handlePost = async (req: NextApiRequest, res: NextApiResponse) => {'Content-Type': 'application/json',Accept: 'application/json',Authorization: `Bearer ${process.env.SUPABASE_ANON_KEY}`,- apiKey: process.env.SUPABASE_ANON_KEY,})const url = `${process.env.SUPABASE_URL}/auth/v1/invite`const payload = { email: req.body.email }- const response = await post(url, payload, headers)+ const response = await post(url, payload, { headers })return res.status(200).json(response)}diff --git a/studio/pages/api/auth/[ref]/magiclink.ts b/studio/pages/api/auth/[ref]/magiclink.tsindex 9b3eec72fa7..9bfc6237527 100644--- a/studio/pages/api/auth/[ref]/magiclink.ts+++ b/studio/pages/api/auth/[ref]/magiclink.ts@@ -25,10 +25,9 @@ const handlePost = async (req: NextApiRequest, res: NextApiResponse) => {'Content-Type': 'application/json',Accept: 'application/json',Authorization: `Bearer ${process.env.SUPABASE_ANON_KEY}`,- apiKey: process.env.SUPABASE_ANON_KEY,})const url = `${process.env.SUPABASE_URL}/auth/v1/magiclink`const payload = { email: req.body.email }- const response = await post(url, payload, headers)+ const response = await post(url, payload, { headers })return res.status(200).json(response)}diff --git a/studio/pages/api/auth/[ref]/otp.ts b/studio/pages/api/auth/[ref]/otp.tsindex 2c32cbcd28e..03bf68cd6cf 100644--- a/studio/pages/api/auth/[ref]/otp.ts+++ b/studio/pages/api/auth/[ref]/otp.ts@@ -25,10 +25,9 @@ const handlePost = async (req: NextApiRequest, res: NextApiResponse) => {'Content-Type': 'application/json',Accept: 'application/json',Authorization: `Bearer ${process.env.SUPABASE_ANON_KEY}`,- apiKey: process.env.SUPABASE_ANON_KEY,})const url = `${process.env.SUPABASE_URL}/auth/v1/otp`const payload = { phone: req.body.phone }- const response = await post(url, payload, headers)+ const response = await post(url, payload, { headers })return res.status(200).json(response)}diff --git a/studio/pages/api/auth/[ref]/recover.ts b/studio/pages/api/auth/[ref]/recover.tsindex 3981aee8242..4226d1612d2 100644--- a/studio/pages/api/auth/[ref]/recover.ts+++ b/studio/pages/api/auth/[ref]/recover.ts@@ -25,10 +25,9 @@ const handlePost = async (req: NextApiRequest, res: NextApiResponse) => {'Content-Type': 'application/json',Accept: 'application/json',Authorization: `Bearer ${process.env.SUPABASE_ANON_KEY}`,- apiKey: process.env.SUPABASE_ANON_KEY,})const url = `${process.env.SUPABASE_URL}/auth/v1/recover`const payload = { email: req.body.email }- const response = await post(url, payload, headers)+ const response = await post(url, payload, { headers })return res.status(200).json(response)}