接口请求返回登录页后不再重定向

This commit is contained in:
2026-06-17 14:00:09 +08:00
parent dfaf39e37e
commit bdd4424f44

View File

@@ -126,7 +126,7 @@ async function call<R = undefined>(url: string, body: RequestInit['body'], auth?
})
if (response.status === 401) {
return redirect('/login?redirect=' + encodeURIComponent(url.replace(API_BASE_URL, '')))
return redirect('/login')
}
const type = response.headers.get('Content-Type') ?? 'text/plain'