接口请求返回登录页后不再重定向
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user