mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 17:59:39 +02:00
refactor: restructure
monorepo with apps/ and services/ directories
This commit is contained in:
parent
25824ed0ac
commit
ff80aeec1f
4062 changed files with 2592 additions and 1278 deletions
|
|
@ -1,35 +0,0 @@
|
|||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('http://127.0.0.1:8090');
|
||||
|
||||
async function test() {
|
||||
try {
|
||||
console.log('Testing connection to PocketBase...');
|
||||
|
||||
// Test 1: Get all users
|
||||
const users = await pb.collection('users').getList(1, 10);
|
||||
console.log('Found users:', users.items.length);
|
||||
users.items.forEach((u) => console.log(` - username: "${u.username}" (${u.email})`));
|
||||
|
||||
// Test 2: Find specific user
|
||||
const user = await pb.collection('users').getFirstListItem('username="memoro"');
|
||||
console.log('\nFound specific user:', user.username, user.id);
|
||||
|
||||
// Test 3: Get folders for user
|
||||
const folders = await pb.collection('folders').getList(1, 50, {
|
||||
filter: `user_id="${user.id}" && is_public=true`
|
||||
});
|
||||
console.log('Public folders:', folders.items.length);
|
||||
|
||||
// Test 4: Get links for user
|
||||
const links = await pb.collection('links').getList(1, 100, {
|
||||
filter: `user_id="${user.id}" && is_active=true`
|
||||
});
|
||||
console.log('Active links:', links.items.length);
|
||||
} catch (err) {
|
||||
console.error('Error:', err.message);
|
||||
console.error('Full error:', err);
|
||||
}
|
||||
}
|
||||
|
||||
test();
|
||||
Loading…
Add table
Add a link
Reference in a new issue