From 1078e7abbbf1528ced840af2e174677511f215dc Mon Sep 17 00:00:00 2001 From: dcore94 Date: Tue, 16 Apr 2024 13:03:11 +0200 Subject: [PATCH] removed redundant logs --- boot/d4s-boot.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/boot/d4s-boot.js b/boot/d4s-boot.js index 600a518..f0a174a 100644 --- a/boot/d4s-boot.js +++ b/boot/d4s-boot.js @@ -124,14 +124,14 @@ window.customElements.define('d4s-boot-2', class extends HTMLElement { }).then(token => { console.log("Authorized. Token exp: " + this.expirationDate(this.parseJwt(token).exp)) //transform all queued requests to fetches - console.log("All pending requests to promises") + //console.log("All pending requests to promises") let promises = this.#queue.map(r => { r.request.headers["Authorization"] = "Bearer " + token return r.resolve( fetch(r.url, r.request) ) }) //clear queue this.#queue = [] - console.log("Resolving all fetches") + //console.log("Resolving all fetches") return Promise.all(promises) }).catch(err => console.error("Unable to make calls: " + err)) // Sometimes throws: Unable to make calls: TypeError: Cannot read properties of undefined (reading 'split') @@ -177,7 +177,7 @@ window.customElements.define('d4s-boot-2', class extends HTMLElement { } else { req.headers = { "Authorization" : null} } - console.log("Queued request to url ", url) + //console.log("Queued request to url ", url) this.#queue.push({ url : url, request : req, resolve : resolve, reject : reject}) }) return p @@ -202,7 +202,7 @@ window.customElements.define('d4s-boot-2', class extends HTMLElement { .then(response => response.json()) .then(json => { this.#config = json - console.log("Keycloak uma2 configuration loaded") + //console.log("Keycloak uma2 configuration loaded") resolve(true) }) .catch(err => reject("Failed to fetch uma2-configuration from server: " + err))