16 lines
408 B
TypeScript
16 lines
408 B
TypeScript
import PocketBase from 'pocketbase';
|
|
|
|
const pb = new PocketBase('https://pocketbase.ccllc.pro');
|
|
|
|
async function check() {
|
|
try {
|
|
await pb.admins.authWithPassword("timothy@ccllc.pro", 'pass');
|
|
const res = await pb.collection('Job_Info_Prod').getList(1, 1);
|
|
console.log("Got item:", res.items[0]);
|
|
} catch (e) {
|
|
console.error("Auth / Fetch Error", e);
|
|
}
|
|
}
|
|
|
|
check();
|