Changes for page LiveTableServiceWorker
Last modified by bougault on 2022/03/22 17:19
Summary
-
Objects (1 modified, 0 added, 0 removed)
Details
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -15,7 +15,8 @@ 15 15 if(pathname === '/bin/get/XWiki/LiveTableResults') { 16 16 //const res = fetch(event.request).then(res => res.json()).then(json => json["rows"].filter(row => row.doc_viewable === true)); 17 17 event.respondWith(fetch(event.request).then(res => res.json()).then(json => { 18 - const headers = new Headers('Content-Type', 'application/json'); 18 + const headers = new Headers({'Content-Type': 'application/json'}); 19 + json["aaaa"] = "aaaa"; 19 19 return new Response(JSON.stringify(json), {headers}); 20 20 })); 21 21 }