From f952bb96adb307a4429bd2df4637270b8998d607 Mon Sep 17 00:00:00 2001 From: Inian Date: Thu, 31 Mar 2022 17:10:36 +0200 Subject: [PATCH] add default curl data --- studio/pages/project/[ref]/functions/[id]/details.tsx | 5 +++-- studio/pages/project/[ref]/functions/index.tsx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/studio/pages/project/[ref]/functions/[id]/details.tsx b/studio/pages/project/[ref]/functions/[id]/details.tsx index 41efe30463d..ae216dbd2d1 100644 --- a/studio/pages/project/[ref]/functions/[id]/details.tsx +++ b/studio/pages/project/[ref]/functions/[id]/details.tsx @@ -108,14 +108,15 @@ const PageLayout: NextPageWithLayout = () => { { command: `curl -L -X POST 'https://${ref}.functions.supabase.co/${ selectedFunction?.slug - }' -H 'Authorization: Bearer ${anonKey ?? '[YOUR ANON KEY]'}'`, + }' -H 'Authorization: Bearer ${anonKey ?? '[YOUR ANON KEY]'}' + --data '{"name":"Functions"}`, description: 'Invokes the hello function', jsx: () => { return ( <> curl -L -X POST 'https://{ref} .functions.supabase.co/{selectedFunction?.slug}' -H 'Authorization: Bearer [YOUR ANON - KEY]' + KEY]' {`--data '{"name":"Functions"}`} ) }, diff --git a/studio/pages/project/[ref]/functions/index.tsx b/studio/pages/project/[ref]/functions/index.tsx index 9ddb183a13f..7b3ef02b0d3 100644 --- a/studio/pages/project/[ref]/functions/index.tsx +++ b/studio/pages/project/[ref]/functions/index.tsx @@ -103,13 +103,14 @@ const EmptyFunctions = () => { { command: `curl -L -X POST 'https://${ref}.functions.supabase.co/hello' -H 'Authorization: Bearer ${ anonKey ?? '[YOUR ANON KEY]' - }'`, + }' --data '{"name":"Functions"}`, description: 'Invokes the hello function', jsx: () => { return ( <> curl -L -X POST 'https://{ref} - .functions.supabase.co/hello' -H 'Authorization: Bearer [YOUR ANON KEY]' + .functions.supabase.co/hello' -H 'Authorization: Bearer [YOUR ANON KEY]'{' '} + {`--data '{"name":"Functions"}`} ) },