mirror of
https://github.com/supabase/supabase.git
synced 2026-06-06 05:17:15 +08:00
chore(studio): Edge functions secrets trim secret value for single value (#42382)
## Context Addresses a small footgun where copying and paste a single value with new lines and hitting save in the edge function secrets page will also save the new lines in the secret name. Fix is just adding a trim <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Internal code organization and refactoring improvements to enhance codebase maintainability and consistency across the Functions module. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
import { PermissionAction } from '@supabase/shared-types/out/constants'
|
||||
import { Search } from 'lucide-react'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
|
||||
import { useParams } from 'common'
|
||||
import AlertError from 'components/ui/AlertError'
|
||||
import NoPermission from 'components/ui/NoPermission'
|
||||
import { useSecretsDeleteMutation } from 'data/secrets/secrets-delete-mutation'
|
||||
import { useSecretsQuery } from 'data/secrets/secrets-query'
|
||||
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
|
||||
import { Search } from 'lucide-react'
|
||||
import { parseAsString, useQueryState } from 'nuqs'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import { Badge, Card, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from 'ui'
|
||||
import { Input } from 'ui-patterns/DataInputs/Input'
|
||||
import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
|
||||
import { GenericSkeletonLoader } from 'ui-patterns/ShimmeringLoader'
|
||||
|
||||
import AddNewSecretForm from './AddNewSecretForm'
|
||||
import EdgeFunctionSecret from './EdgeFunctionSecret'
|
||||
import { EditSecretSheet } from './EditSecretSheet'
|
||||
@@ -34,12 +34,7 @@ export const EdgeFunctionSecrets = () => {
|
||||
isPending: isLoading,
|
||||
isSuccess,
|
||||
isError,
|
||||
} = useSecretsQuery(
|
||||
{
|
||||
projectRef: projectRef,
|
||||
},
|
||||
{ enabled: canReadSecrets }
|
||||
)
|
||||
} = useSecretsQuery({ projectRef: projectRef }, { enabled: canReadSecrets })
|
||||
|
||||
const [selectedIdToEdit, setSelectedIdToEdit] = useQueryState(
|
||||
'edit',
|
||||
|
||||
Reference in New Issue
Block a user