added e.action to the realtime docs preview

This commit is contained in:
Gani Georgiev committed 2023-07-20 13:10:23 +03:00
1 parent 06016722d1
commit f660707712
31 files changed
+69 -57

No files matched your search

@@ -52,11 +52,13 @@
// Subscribe to changes in any ${collection?.name} record
pb.collection('${collection?.name}').subscribe('*', function (e) {
console.log(e.action);
console.log(e.record);
});
// Subscribe to changes only in the specified record
pb.collection('${collection?.name}').subscribe('RECORD_ID', function (e) {
console.log(e.action);
console.log(e.record);
});
@@ -77,11 +79,13 @@
// Subscribe to changes in any ${collection?.name} record
pb.collection('${collection?.name}').subscribe('*', (e) {
print(e.action);
print(e.record);
});
// Subscribe to changes only in the specified record
pb.collection('${collection?.name}').subscribe('RECORD_ID', (e) {
print(e.action);
print(e.record);
});