fp/services/pocketbase/utils/data_migrations/2025-11-05-see-image-internal.js
CJ_Clippy 6caf2dbcc3
Some checks failed
ci / test (push) Failing after 9m42s
fp/our CI/CD / build (push) Successful in 1m19s
add /vods and /vt/:slug/vods
2025-11-08 12:36:26 -08:00

21 lines
566 B
JavaScript

import PocketBase from 'pocketbase';
const pb = new PocketBase(process.env.PB_URL || 'http://127.0.0.1:8090');
async function main() {
console.log('Authenticating with PocketBase...');
await pb
.collection("_superusers")
.authWithPassword(process.env.PB_USERNAME, process.env.PB_PASSWORD);
const name = 'mirakink'
const vt = await pb.collection('vtubers').getFirstListItem(`slug="${name}"`);
if (!vt) {
throw new Error(`Could not find vtuber with slug "${name}"`);
}
console.log(`image internals as follows`)
console.log(vt)
}
main()