forked from decodedcorp/decoded-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug-api.mjs
More file actions
18 lines (18 loc) · 708 Bytes
/
debug-api.mjs
File metadata and controls
18 lines (18 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Quick test to check the actual API response structure
fetch('http://localhost:3001/api/proxy/contents/channel/688a317213dbcfcd941c85b4?skip=0&limit=20')
.then(response => {
console.log('Response status:', response.status);
console.log('Response headers:', Object.fromEntries(response.headers.entries()));
return response.json();
})
.then(data => {
console.log('Response data structure:', JSON.stringify(data, null, 2));
console.log('Data keys:', Object.keys(data));
if (data.contents) {
console.log('Contents length:', data.contents.length);
console.log('First content:', data.contents[0]);
}
})
.catch(error => {
console.error('Error:', error);
});