added e.action to the realtime docs preview

This commit is contained in:
Gani Georgiev
2023-07-20 13:10:17 +03:00
parent 06016722d1
commit f660707712
31 changed files with 69 additions and 57 deletions
@@ -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);
});