Skip to content

Commit

Permalink
fix: function slug
Browse files Browse the repository at this point in the history
  • Loading branch information
inian committed Mar 31, 2022
1 parent 15646d3 commit 1bd764f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const FunctionsListItem: FC<Props> = ({ function: item }) => {
HTTP Request
</span> */}
<div className="text-xs text-scale-900 flex gap-2 items-center truncate">
<span className="font-mono truncate hidden md:inline">{`https://${ref}.supabase.com/functions/${item.name}`}</span>
<span className="font-mono truncate hidden md:inline">{`https://${ref}.supabase.com/functions/${item.slug}`}</span>
<span className="font-mono truncate md:hidden">{`/${item.name}`}</span>
</div>
</Table.td>
Expand Down
9 changes: 5 additions & 4 deletions studio/pages/project/[ref]/functions/[id]/details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,16 @@ const PageLayout: NextPageWithLayout = () => {

const invokeCommands: any = [
{
command: `curl -L -X POST 'https://${ref}.functions.supabase.co/hello' -H 'Authorization: Bearer ${
anonKey ?? '[YOUR ANON KEY]'
}'`,
command: `curl -L -X POST 'https://${ref}.functions.supabase.co/${
selectedFunction?.slug
}' -H 'Authorization: Bearer ${anonKey ?? '[YOUR ANON KEY]'}'`,
description: 'Invokes the hello function',
jsx: () => {
return (
<>
<span className="text-brand-1100">curl</span> -L -X POST 'https://{ref}
.functions.supabase.co/hello' -H 'Authorization: Bearer [YOUR ANON KEY]'
.functions.supabase.co/{selectedFunction?.slug}' -H 'Authorization: Bearer [YOUR ANON
KEY]'
</>
)
},
Expand Down

0 comments on commit 1bd764f

Please sign in to comment.