ngx-rendering-service-lib 0.0.18 → 0.0.19
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.
|
@@ -78,12 +78,13 @@ const handleSessionRequest = async (request) => {
|
|
|
78
78
|
*/
|
|
79
79
|
const handleRenderDataRequest = async (request) => {
|
|
80
80
|
const response = await fetch(request)
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
const dbRequestGet = buildDbRequest()
|
|
82
|
+
const dbRequestWrite = buildDbRequest()
|
|
83
|
+
if (dbRequestGet !== undefined && dbRequestWrite !== undefined) {
|
|
84
|
+
const existingSessionId = await retrieveSessionIdFromDb(dbRequestGet)
|
|
84
85
|
const newSessionId = response.headers.get(SESSION_HEADER_NAME)
|
|
85
86
|
if (newSessionId !== null && newSessionId !== "" && newSessionId !== existingSessionId) {
|
|
86
|
-
await storeSessionIdToDb(
|
|
87
|
+
await storeSessionIdToDb(dbRequestWrite, newSessionId)
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
return response
|