update
This commit is contained in:
@@ -34,10 +34,33 @@ async function main() {
|
||||
// await sleep(100); // To avoid hitting rate limits
|
||||
// }
|
||||
|
||||
const list = await pbService.collection.getFullList({
|
||||
sort: '-created',
|
||||
fields: 'id,title,summary,description,tags,status',
|
||||
})
|
||||
console.log('PocketBase Records:', list.length);
|
||||
// const list = await pbService.collection.getFullList({
|
||||
// sort: '-created',
|
||||
// fields: 'id,title,summary,description,tags,status',
|
||||
// })
|
||||
// console.log('PocketBase Records:', list.length);
|
||||
|
||||
// const b = await pbService.client.collections.create({
|
||||
// name: 'exampleBase',
|
||||
// type: 'base',
|
||||
// fields: [
|
||||
// {
|
||||
// name: 'title',
|
||||
// type: 'text',
|
||||
// required: true,
|
||||
// min: 10,
|
||||
// },
|
||||
// {
|
||||
// name: 'status',
|
||||
// type: 'bool',
|
||||
// },
|
||||
// ],
|
||||
// });
|
||||
// console.log('Created collection:', b);
|
||||
|
||||
const c = await pbService.createCollection({
|
||||
name: 'exampleBase',
|
||||
});
|
||||
console.log('Created collection via PBService:', c);
|
||||
}
|
||||
main();
|
||||
Reference in New Issue
Block a user