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
-
... ... @@ -10,10 +10,8 @@ 10 10 11 11 self.addEventListener("fetch" , event => { 12 12 const pathname = new URL(event.request.url).pathname; 13 - if(pathname === '/getMembershipRequests') { 14 - console.log('hello I am here'); 15 - const res = new Response('should return membership requests'); 16 - event.respondWith(res); 13 + if(pathname === '/getMembershipRequets') { 14 + return new Response('should return membership requests'); 17 17 /* 18 18 event.respondWith(fetch(event.request).then(res => res.json()).then(json => { 19 19 const headers = new Headers({'Content-Type': 'application/json'});