mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 07:18:49 +01:00
🎨 When access authentication fails, refresh the page to jump to the authentication page https://github.com/siyuan-note/siyuan/issues/15163
This commit is contained in:
parent
62850f8cc3
commit
34b4564289
1 changed files with 3 additions and 0 deletions
|
|
@ -34,6 +34,9 @@ export const fetchPost = (url: string, data?: any, cb?: (response: IWebSocketDat
|
|||
}
|
||||
fetch(url, init).then((response) => {
|
||||
switch (response.status) {
|
||||
case 401:
|
||||
// 返回鉴权失败的话直接刷新页面,避免用户在当前页面操作 https://github.com/siyuan-note/siyuan/issues/15163
|
||||
window.location.reload();
|
||||
case 403:
|
||||
case 404:
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue