mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 21:29:08 +03:00
* Update telemetry calls for docs to support PH * Update telemetry calls for www to support PH * Add ts ignore * Remove use of useRouter for docs * Add credentials include for www and docs for telemetry calls * Update TELEMETRY_CONSENT in common for www and docs to reset telemetry opt in preference * Update common telemetry to use new endpoint and payload, and trigger reset request when opting out of telemetry from ui patterns PrigacySettings * Fix * Fix * Fix * Fix build issue in docs * Fix build issue in docs * I hope this fixes the build issues * once more... * Fix * Add credentials include * Fix
22 lines
580 B
TypeScript
22 lines
580 B
TypeScript
interface DataProps {
|
|
[prop: string]: any
|
|
}
|
|
|
|
export const post = (url: string, data: DataProps, options = {} as { [key: string]: any }) => {
|
|
const { optionHeaders, ...otherOptions } = options
|
|
return fetch(url, {
|
|
method: 'POST',
|
|
headers: {
|
|
'Content-Type': 'application/json',
|
|
Accept: 'application/json',
|
|
...optionHeaders,
|
|
},
|
|
credentials: 'include',
|
|
referrerPolicy: 'no-referrer-when-downgrade',
|
|
body: JSON.stringify(data),
|
|
...otherOptions,
|
|
}).catch((error) => {
|
|
console.error('Error at fetchWrapper - post:', error)
|
|
})
|
|
}
|