mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-25 14:30:24 +01:00
added e.action to the realtime docs preview
This commit is contained in:
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);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user