ngx-rendering-service-lib 0.0.19 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,6 @@ const ASSET_PATH = "public/asset"
|
|
|
6
6
|
const DB_NAME = "Edu-Sharing-Rendering"
|
|
7
7
|
const DB_STORE = "SessionIds"
|
|
8
8
|
|
|
9
|
-
/** @type {FetchEvent} */
|
|
10
9
|
self.addEventListener('install', function (event) {
|
|
11
10
|
// Skip the 'waiting' lifecycle phase, to go directly from 'installed' to 'activated', even if
|
|
12
11
|
// there are still previous incarnations of this service worker registration active.
|
|
@@ -78,12 +77,12 @@ const handleSessionRequest = async (request) => {
|
|
|
78
77
|
*/
|
|
79
78
|
const handleRenderDataRequest = async (request) => {
|
|
80
79
|
const response = await fetch(request)
|
|
81
|
-
const dbRequestGet = buildDbRequest()
|
|
80
|
+
//const dbRequestGet = buildDbRequest()
|
|
82
81
|
const dbRequestWrite = buildDbRequest()
|
|
83
|
-
if (
|
|
84
|
-
const existingSessionId = await retrieveSessionIdFromDb(dbRequestGet)
|
|
82
|
+
if (dbRequestWrite !== undefined) {
|
|
83
|
+
//const existingSessionId = await retrieveSessionIdFromDb(dbRequestGet)
|
|
85
84
|
const newSessionId = response.headers.get(SESSION_HEADER_NAME)
|
|
86
|
-
if (newSessionId !== null && newSessionId !== ""
|
|
85
|
+
if (newSessionId !== null && newSessionId !== "") {
|
|
87
86
|
await storeSessionIdToDb(dbRequestWrite, newSessionId)
|
|
88
87
|
}
|
|
89
88
|
}
|