The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Add sendReset call when user opts out of telemetry (#29785)
Joshen Lim1c74d1ed95ae
diff --git a/apps/studio/components/interfaces/Account/Preferences/AnalyticsSettings.tsx b/apps/studio/components/interfaces/Account/Preferences/AnalyticsSettings.tsxindex 15f9992a9bc..779e48e5c07 100644--- a/apps/studio/components/interfaces/Account/Preferences/AnalyticsSettings.tsx+++ b/apps/studio/components/interfaces/Account/Preferences/AnalyticsSettings.tsx@@ -2,13 +2,16 @@ import { Toggle } from 'ui'import Panel from 'components/ui/Panel'import { useAppStateSnapshot } from 'state/app-state'+import { useSendResetMutation } from 'data/telemetry/send-reset-mutation'const AnalyticsSettings = () => {const snap = useAppStateSnapshot()+ const { mutate: sendReset } = useSendResetMutation()const onToggleOptIn = () => {const value = !snap.isOptedInTelemetry ? 'true' : 'false'snap.setIsOptedInTelemetry(value === 'true')+ if (value === 'false') sendReset()}return (diff --git a/apps/studio/data/telemetry/send-page-mutation.ts b/apps/studio/data/telemetry/send-page-mutation.tsindex 7a8b33d5e91..5bf477abe06 100644--- a/apps/studio/data/telemetry/send-page-mutation.ts+++ b/apps/studio/data/telemetry/send-page-mutation.ts@@ -47,7 +47,7 @@ export const useSendPageMutation = ({ph: {referrer,language: router?.locale ?? 'en-US',- userAgent: navigator.userAgent,+ user_agent: navigator.userAgent,search: window.location.search,viewport_height: isBrowser ? window.innerHeight : 0,viewport_width: isBrowser ? window.innerWidth : 0,diff --git a/packages/api-types/types/api.d.ts b/packages/api-types/types/api.d.tsindex 70fb935effa..1c57c882648 100644--- a/packages/api-types/types/api.d.ts+++ b/packages/api-types/types/api.d.ts@@ -5595,7 +5595,7 @@ export interface components {language: stringreferrer: stringsearch: string- userAgent: string+ user_agent: stringviewport_height: numberviewport_width: number}@@ -5637,7 +5637,7 @@ export interface components {language: stringreferrer: stringsearch: string- userAgent: string+ user_agent: stringviewport_height: numberviewport_width: number}@@ -11999,6 +11999,9 @@ export interface operations {'application/json': components['schemas']['PostgresConfigResponse']}}+ 403: {+ content: never+ }/** @description Failed to update project's Postgres config */500: {content: never