-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug-post.js
More file actions
26 lines (23 loc) · 827 Bytes
/
debug-post.js
File metadata and controls
26 lines (23 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Simple debug script to test post fetching
const { fetchPostData } = require('./lib/server-actions.ts');
async function testUrls() {
const urls = [
'https://floss.social/@cjpaloma@mas.to/114897897577249443', // Working URL
'https://mastodon.art/@hbtyson/114894668769042423', // Not working URL
'https://floss.social/@hbtyson@mastodon.art/114894668953797190' // Not working URL
];
for (const url of urls) {
console.log(`\n=== Testing: ${url} ===`);
try {
const result = await fetchPostData(url);
if (result) {
console.log(`✅ Success: Found post by ${result.author.name}`);
} else {
console.log(`❌ Failed: No data returned`);
}
} catch (error) {
console.log(`❌ Error: ${error.message}`);
}
}
}
testUrls().catch(console.error);