mirror of
https://github.com/mudabbir-ahmad/Media-Aggregation-and-Sorting-System.git
synced 2026-10-07 19:40:20 +00:00
feat: integrate device media service for local photo access and update service icons/names
This commit is contained in:
1 parent
e5dbdfeba3
commit
0ef59ba5d3
9 files changed
+313
-94
No files matched your search
@@ -49,10 +49,14 @@ async function main() {
|
||||
console.log(` Failed: ${err.message}\n`);
|
||||
}
|
||||
|
||||
// Test 2 — List media items
|
||||
console.log('[2] Listing media items (first 10)...');
|
||||
// Test 2 — Search media items (replaces deprecated GET /mediaItems)
|
||||
console.log('[2] Searching media items (first 10)...');
|
||||
try {
|
||||
const res = await fetch(`${API_BASE}/mediaItems?pageSize=10`, { headers });
|
||||
const res = await fetch(`${API_BASE}/mediaItems:search`, {
|
||||
method: 'POST',
|
||||
headers: { ...headers, 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ pageSize: 10 }),
|
||||
});
|
||||
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
|
||||
const data = await res.json();
|
||||
const items = data.mediaItems || [];
|
||||
|
||||
Reference in new issue
Block a user