diff --git a/.history/IOT/src/admin/updateAdmin_20230424121758.js b/.history/IOT/src/admin/updateAdmin_20230424121758.js new file mode 100644 index 0000000..e69de29 diff --git a/.history/IOT/src/admin/updateAdmin_20230424121810.js b/.history/IOT/src/admin/updateAdmin_20230424121810.js new file mode 100644 index 0000000..a3803dc --- /dev/null +++ b/.history/IOT/src/admin/updateAdmin_20230424121810.js @@ -0,0 +1,13 @@ +import PocketBase from 'pocketbase'; + +const pb = new PocketBase('http://127.0.0.1:8090'); + +... + +await pb.admins.authWithPassword('test@example.com', '1234567890'); + +const admin = await pb.admins.update('ADMIN_ID', { + password: '0987654321', + passwodConfirm: '0987654321', + avatar: 4, +}); \ No newline at end of file diff --git a/.history/IOT/src/admin/updateAdmin_20230424121813.js b/.history/IOT/src/admin/updateAdmin_20230424121813.js new file mode 100644 index 0000000..aa4ba09 --- /dev/null +++ b/.history/IOT/src/admin/updateAdmin_20230424121813.js @@ -0,0 +1,11 @@ +import PocketBase from 'pocketbase'; + +const pb = new PocketBase('http://127.0.0.1:8090'); + +await pb.admins.authWithPassword('test@example.com', '1234567890'); + +const admin = await pb.admins.update('ADMIN_ID', { + password: '0987654321', + passwodConfirm: '0987654321', + avatar: 4, +}); \ No newline at end of file diff --git a/IOT/src/admin/updateAdmin.js b/IOT/src/admin/updateAdmin.js new file mode 100644 index 0000000..aa4ba09 --- /dev/null +++ b/IOT/src/admin/updateAdmin.js @@ -0,0 +1,11 @@ +import PocketBase from 'pocketbase'; + +const pb = new PocketBase('http://127.0.0.1:8090'); + +await pb.admins.authWithPassword('test@example.com', '1234567890'); + +const admin = await pb.admins.update('ADMIN_ID', { + password: '0987654321', + passwodConfirm: '0987654321', + avatar: 4, +}); \ No newline at end of file