fix: Use getToken() instead of localStorage.getItem('token')
getToken() is the correct way to get auth token (imported from AuthContext)
This commit is contained in:
parent
8d9b5bf397
commit
146cd29234
|
|
@ -410,7 +410,7 @@ export const api = {
|
||||||
|
|
||||||
// TODO: Security improvement - use session cookie instead of token in URL
|
// TODO: Security improvement - use session cookie instead of token in URL
|
||||||
// For now, send token as query param since EventSource doesn't support custom headers
|
// For now, send token as query param since EventSource doesn't support custom headers
|
||||||
const token = localStorage.getItem('token')
|
const token = getToken()
|
||||||
if (token) params.append('token', token)
|
if (token) params.append('token', token)
|
||||||
|
|
||||||
if (modules) {
|
if (modules) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user