Skip to content

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

move arguments to their own lines for ease of reading and consistency

Brad M Mallow1e7c4556bba1
diff --git a/apps/docs/pages/guides/realtime/postgres-changes.mdx b/apps/docs/pages/guides/realtime/postgres-changes.mdx
index 79a76e884b2..0d68f25c2ef 100644
--- a/apps/docs/pages/guides/realtime/postgres-changes.mdx
+++ b/apps/docs/pages/guides/realtime/postgres-changes.mdx
@@ -63,7 +63,14 @@ const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_KEY
*/
const channel = supabase
.channel('schema-db-changes')
- .on('postgres_changes', { event: '*', schema: 'public' }, (payload) => console.log(payload))
+ .on(
+ 'postgres_changes',
+ {
+ event: '*',
+ schema: 'public',
+ },
+ (payload) => console.log(payload)
+ )
.subscribe()
```
@@ -74,8 +81,14 @@ To listen to changes on a table in the `public` schema:
const channel = supabase
.channel('table-db-changes')
- .on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'messages' }, (payload) =>
- console.log(payload)
+ .on(
+ 'postgres_changes',
+ {
+ event: 'INSERT',
+ schema: 'public',
+ table: 'messages',
+ },
+ (payload) => console.log(payload)
)
.subscribe()
```
@@ -109,11 +122,21 @@ const channel = supabase
.channel('db-changes')
.on(
'postgres_changes',
- { event: '*', schema: 'public', table: 'messages', filter: 'body=eq.bye' },
+ {
+ event: '*',
+ schema: 'public',
+ table: 'messages',
+ filter: 'body=eq.bye',
+ },
(payload) => console.log(payload)
)
- .on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'users' }, (payload) =>
- console.log(payload)
+ .on('postgres_changes',
+ {
+ event: 'INSERT',
+ schema: 'public',
+ table: 'users',
+ },
+ (payload) => console.log(payload)
)
.subscribe()
```