From 3677d741f23331ae2942e2ac4b9d93a09a2d849f Mon Sep 17 00:00:00 2001 From: Angelico Date: Tue, 21 Jan 2020 13:52:47 +0800 Subject: [PATCH] Boyscout: fix formatting for return values of realtime events --- web/docs/library/subscribe.mdx | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/web/docs/library/subscribe.mdx b/web/docs/library/subscribe.mdx index f8823675ee3..62827ecf8dd 100644 --- a/web/docs/library/subscribe.mdx +++ b/web/docs/library/subscribe.mdx @@ -291,9 +291,7 @@ Upon inserting or creating a new row, the following will be returned by our list ```json { "eventType": "INSERT", - "new": [ - { "name": "Middle Earth", "country_id": "554" } - ] + "new": { "name": "Middle Earth", "country_id": "554" } } ``` @@ -305,12 +303,8 @@ Upon updating a row, the following will be returned by our listener: ```json { "eventType": "UPDATE", - "old": [ - { "name": "Middle Earth", "country_id": "554" } - ], - "new": [ - { "name": "Wellington", "country_id": "554" } - ] + "old": { "name": "Middle Earth", "country_id": "554" }, + "new": { "name": "Wellington", "country_id": "554" } } ``` @@ -322,8 +316,6 @@ Upon deleting a row, the following will be returned by our listener: ```json { "eventType": "DELETE", - "old": [ - { "name": "Mordor", "country_id": "554" } - ] + "old": { "name": "Mordor", "country_id": "554" } } ```