refactor: hide theme toggle and lang dropdown in header when logged in
This commit is contained in:
@@ -156,11 +156,10 @@ class DirectusService {
|
||||
if (response.status === 401 && this.refreshToken && !endpoint.startsWith('/auth/')) {
|
||||
const refreshed = await this.refreshSession()
|
||||
if (refreshed) {
|
||||
headers['Authorization'] = `Bearer ${this.accessToken}`
|
||||
return this.request(endpoint, options)
|
||||
} else {
|
||||
// Refresh failed - clear tokens to prevent loops
|
||||
this.clearTokens()
|
||||
return this.request(endpoint, options)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user