make phone calls

This commit is contained in:
m5r
2022-06-11 19:29:58 +02:00
parent dbe209c7fc
commit f1702180b7
9 changed files with 49 additions and 24 deletions

View File

@ -59,6 +59,10 @@ const lastTimeRevalidated: Record<string, number> = {};
export function fetchLoaderData(event: FetchEvent): Promise<Response> {
const url = new URL(event.request.url);
if (url.pathname === "/outgoing-call/twilio-token") {
return fetch(event.request);
}
const path = url.pathname + url.search;
return caches.match(event.request, { cacheName: DATA_CACHE }).then((cachedResponse) => {