diff --git a/src/api/api.js b/src/api/api.js index bd113e6..4684a61 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -82,10 +82,11 @@ export async function fetchStream(url, params = {}, onChunk = (chunk) => {}) { showFullScreenLoading(); try { const token = window.sessionStorage.getItem('token'); + let tokentype = window.sessionStorage.getItem("tokentype"); const headers = { 'Content-Type': 'application/json' }; - if (token) headers['Authorization'] = `Bearer ${token}`; + if (token) headers['Authorization'] = `${tokentype} ${token}`; const resp = await fetch(fullUrl, { method: 'POST',