Skip to content

fix(useFetch): prevent loading when 401#475

Merged
xrgzs merged 2 commits intoOpenListTeam:mainfrom
xrgzs:fix/login
Apr 14, 2026
Merged

fix(useFetch): prevent loading when 401#475
xrgzs merged 2 commits intoOpenListTeam:mainfrom
xrgzs:fix/login

Conversation

@xrgzs
Copy link
Copy Markdown
Member

@xrgzs xrgzs commented Apr 14, 2026

Description / 描述

移除无用的检测,避免登录时密码错误转圈。

Motivation and Context / 背景

当响应 code 为 401 时,setLoading(false) 被跳过,导致登录失败时 loading 永远不会清除。

Fixes OpenListTeam/OpenList#2364

How Has This Been Tested? / 测试

测试账号密码登录不会一直转圈。

输入OTP会跳转二级页面,不存在转不转圈的情况,用不到402。

Checklist / 检查清单

  • I have read the CONTRIBUTING document.
    我已阅读 CONTRIBUTING 文档。
  • I have formatted my code with go fmt or prettier.
    我已使用 go fmtprettier 格式化提交的代码。
  • I have added appropriate labels to this PR (or mentioned needed labels in the description if lacking permissions).
    我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
  • I have requested review from relevant code authors using the "Request review" feature when applicable.
    我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
  • I have updated the repository accordingly (If it’s needed).
    我已相应更新了相关仓库(若适用)。

xrgzs added 2 commits April 14, 2026 17:57
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
@xrgzs xrgzs added the bug Something isn't working label Apr 14, 2026
@xrgzs xrgzs requested a review from jyxjjj April 14, 2026 10:09
@xrgzs xrgzs merged commit 0d1e1ad into OpenListTeam:main Apr 14, 2026
1 check passed
@xrgzs xrgzs deleted the fix/login branch April 14, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 4.2.1 版本,账号密码错误时登录一直转圈

2 participants