change url
This commit is contained in:
parent
cf642acfb4
commit
a3768a51eb
7
.history/IOT/src/admin/getOneAdmin_20230424142525.js
Normal file
7
.history/IOT/src/admin/getOneAdmin_20230424142525.js
Normal file
@ -0,0 +1,7 @@
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('https://iot.epi.cb85.software');
|
||||
|
||||
await pb.admins.authWithPassword('test@example.com', '123456');
|
||||
|
||||
const admin = await pb.admins.getOne('ADMIN_ID');
|
16
.history/IOT/src/admin/listAdmins_20230424142541.js
Normal file
16
.history/IOT/src/admin/listAdmins_20230424142541.js
Normal file
@ -0,0 +1,16 @@
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('https://iot.epi.cb85.software');
|
||||
|
||||
await pb.admins.authWithPassword('test@example.com', '123456');
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await pb.admins.getList(1, 100, {
|
||||
filter: 'created >= \'2022-01-01 00:00:00\'',
|
||||
});
|
||||
|
||||
// you can also fetch all records at once via getFullList
|
||||
const admins = await pb.admins.getFullList({ sort: '-created' });
|
||||
|
||||
// or fetch only the first admin that matches the specified filter
|
||||
const admin = await pb.admins.getFirstListItem('email~"test"');
|
11
.history/IOT/src/admin/updateAdmin_20230424142522.js
Normal file
11
.history/IOT/src/admin/updateAdmin_20230424142522.js
Normal file
@ -0,0 +1,11 @@
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('https://iot.epi.cb85.software');
|
||||
|
||||
await pb.admins.authWithPassword('test@example.com', '1234567890');
|
||||
|
||||
const admin = await pb.admins.update('ADMIN_ID', {
|
||||
password: '0987654321',
|
||||
passwodConfirm: '0987654321',
|
||||
avatar: 4,
|
||||
});
|
@ -1,6 +1,6 @@
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('http://127.0.0.1:8090');
|
||||
const pb = new PocketBase('https://iot.epi.cb85.software');
|
||||
|
||||
await pb.admins.authWithPassword('test@example.com', '123456');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('http://127.0.0.1:8090');
|
||||
const pb = new PocketBase('https://iot.epi.cb85.software');
|
||||
|
||||
await pb.admins.authWithPassword('test@example.com', '123456');
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('http://127.0.0.1:8090');
|
||||
const pb = new PocketBase('https://iot.epi.cb85.software');
|
||||
|
||||
await pb.admins.authWithPassword('test@example.com', '1234567890');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user