Новые правки
This commit is contained in:
parent
79db7c8563
commit
a5f208a132
19 changed files with 852 additions and 1 deletions
16
frontend/scripts/check-posts.ts
Normal file
16
frontend/scripts/check-posts.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import PocketBase from 'pocketbase';
|
||||
|
||||
const PB_URL = 'http://127.0.0.1:8090';
|
||||
const pb = new PocketBase(PB_URL);
|
||||
|
||||
async function main() {
|
||||
const posts = await pb.collection('posts').getList(1, 3);
|
||||
|
||||
for (const post of posts.items as any) {
|
||||
console.log('=== SLUG:', post.slug, '===');
|
||||
console.log(post.content?.substring(0, 1500));
|
||||
console.log('\n---\n');
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
Loading…
Add table
Add a link
Reference in a new issue