fix user refresh

This commit is contained in:
john 2025-05-20 23:43:43 +02:00
parent 0b2a64e449
commit cc3d138fd3
6 changed files with 6 additions and 13 deletions

View file

@ -8,9 +8,6 @@ export function initClient(): ApiClient {
const client = createClient<paths>({ baseUrl: import.meta.env.VITE_API_URL })
const UnauthorizedHandlerMiddleware: Middleware = {
async onResponse({ response }) {
console.debug('on response middleware?')
console.debug(response.headers.getSetCookie())
console.debug(response.headers.get('set-cookie'))
if (response.status === 401) {
dispatchMessage('auth:unauthorized', null)
}