The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Refresh db connection string after resetting db password from UI
Joshen Limdd3072a10c0b
diff --git a/studio/pages/project/[ref]/settings/database.tsx b/studio/pages/project/[ref]/settings/database.tsxindex 56850b1d5d1..386132dec63 100644--- a/studio/pages/project/[ref]/settings/database.tsx+++ b/studio/pages/project/[ref]/settings/database.tsx@@ -10,7 +10,7 @@ import { Input, Button, IconDownload, Tabs, Modal } from 'ui'import { PermissionAction } from '@supabase/shared-types/out/constants'import { NextPageWithLayout } from 'types'-import { checkPermissions, useFlag, useStore } from 'hooks'+import { checkPermissions, useFlag, useParams, useStore } from 'hooks'import { get, patch } from 'lib/common/fetch'import { pluckObjectFields, passwordStrength } from 'lib/helpers'import { API_URL, DEFAULT_MINIMUM_PASSWORD_STRENGTH } from 'lib/constants'@@ -39,8 +39,8 @@ ProjectSettings.getLayout = (page) => <SettingsLayout title="Database">{page}</Sexport default observer(ProjectSettings)const ResetDbPassword: FC<any> = () => {- const { ui } = useStore()- const projectRef = ui.selectedProject?.ref+ const { ui, app, meta } = useStore()+ const { ref } = useParams()const canResetDbPassword = checkPermissions(PermissionAction.UPDATE, 'projects')@@ -83,10 +83,13 @@ const ResetDbPassword: FC<any> = () => {}const confirmResetDbPass = async () => {+ if (!ref) return+if (passwordStrengthScore >= DEFAULT_MINIMUM_PASSWORD_STRENGTH) {setIsUpdatingPassword(true)- const res = await patch(`${API_URL}/projects/${projectRef}/db-password`, { password })+ const res = await patch(`${API_URL}/projects/${ref}/db-password`, { password })if (!res.error) {+ await app.projects.fetchDetail(ref, (project) => meta.setProjectDetails(project))ui.setNotification({ category: 'success', message: res.message })setShowResetDbPass(false)} else {