removed redundant logs
This commit is contained in:
parent
297b2f6ffe
commit
1078e7abbb
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue