Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

add in generated files

Inian0c5a4bb2fbb1
diff --git a/apps/reference/_supabase_js/generated/auth-getuser.mdx b/apps/reference/_supabase_js/generated/auth-getuser.mdx
index cce9bb30d63..a9c49d269e6 100644
--- a/apps/reference/_supabase_js/generated/auth-getuser.mdx
+++ b/apps/reference/_supabase_js/generated/auth-getuser.mdx
@@ -11,7 +11,9 @@ import TabItem from '@theme/TabItem'
Gets the current user details if there is an existing session.
```js
-const user = await supabase.auth.getUser()
+const {
+ data: { user },
+} = await supabase.auth.getUser()
```
## Parameters
@@ -50,11 +52,15 @@ Takes in an optional access token jwt. If no jwt is provided, getUser() will att
### Get the logged in user with the current existing session
```js
-const user = await supabase.auth.getUser()
+const {
+ data: { user },
+} = await supabase.auth.getUser()
```
### Get the logged in user with a custom access token jwt.
```js
-const user = supabase.auth.getUser(jwt)
+const {
+ data: { user },
+} = await supabase.auth.getUser(jwt)
```
diff --git a/apps/reference/_supabase_js/generated/subscribe.mdx b/apps/reference/_supabase_js/generated/subscribe.mdx
index 346bd7632c7..c78f6362474 100644
--- a/apps/reference/_supabase_js/generated/subscribe.mdx
+++ b/apps/reference/_supabase_js/generated/subscribe.mdx
@@ -9,7 +9,7 @@ import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
```js
-const myChannel = supabase
+supabase
.channel('*')
.on('postgres_changes', { event: '*', schema: '*' }, (payload) => {
console.log('Change received!', payload)
@@ -89,14 +89,14 @@ A callback function that will be called when the channel receives a message.
- Row level security is not applied to delete statements.
- If you want to receive the "previous" data for updates and deletes, you will need to set `REPLICA IDENTITY` to `FULL`, like this: `ALTER TABLE your_table REPLICA IDENTITY FULL;`
- When a delete occurs, the contents of old_record will be broadcast to all subscribers to that table so ensure that each table's replica identity only contains information that is safe to expose publicly.
-- The channel name must exactly match the schema/table/filter you want to listen to separated by semicolons. See below examples for additional context.
+- The channel name must exactly match the schema/table/filter you want to listen to separated by colons. See below examples for additional context.
## Examples
### Listen to all database changes
```js
-const myChannel = supabase
+supabase
.channel('*')
.on('postgres_changes', { event: '*', schema: '*' }, (payload) => {
console.log('Change received!', payload)
@@ -107,7 +107,7 @@ const myChannel = supabase
### Listening to a specific table
```js
-const myChannel = supabase
+supabase
.channel('public:countries')
.on(
'postgres_changes',
@@ -122,7 +122,7 @@ const myChannel = supabase
### Listening to inserts
```js
-const myChannel = supabase
+supabase
.channel('public:countries')
.on(
'postgres_changes',
@@ -144,7 +144,7 @@ alter table "your_table" replica identity full;
```
```js
-const myChannel = supabase
+supabase
.channel('public:countries')
.on(
'postgres_changes',
@@ -166,7 +166,7 @@ alter table "your_table" replica identity full;
```
```js
-const myChannel = supabase
+supabase
.channel('public:countries')
.on(
'postgres_changes',
@@ -183,7 +183,7 @@ const myChannel = supabase
You can chain listeners if you want to listen to multiple events for each table.
```js
-const myChannel = supabase
+supabase
.channel('public:countries')
.on(
'postgres_changes',
@@ -203,7 +203,7 @@ const myChannel = supabase
You can listen to individual rows using the format `{table}:{col}=eq.{val}` - where `{col}` is the column name, and `{val}` is the value which you want to match.
```js
-const myChannel = supabase
+supabase
.channel('public:countries:id=eq.200')
.on(
'postgres_changes',