Merge pull request #670 from 2huo/main

fix: incorrect password format
This commit is contained in:
Estrella Pan
2024-01-15 16:01:34 +08:00
committed by GitHub
3 changed files with 7 additions and 10 deletions

View File

@@ -18,13 +18,11 @@ body:
options:
- label: 我的版本是最新版本,我的版本号与 [version](https://github.com/EstrellaXD/Auto_Bangumi/releases/latest) 相同。
required: true
- label: 我已经查阅了[排错流程](https://autobangumi.org/faq/排错流程.html),确保提出的问题不在其中。
required: true
- label: 我已经查阅了[已知问题](https://autobangumi.org/faq/常见问题.html),并确认我的问题不在其中。
- label: 我已经查阅了[已知问题](https://autobangumi.org/faq/),并确认我的问题不在其中。
required: true
- label: 我已经 [issue](https://github.com/EstrellaXD/Auto_Bangumi/issues) 中搜索过,确认我的问题没有被提出过。
required: true
- label: 我已经修改标题,将标题中的 描述 替换为我遇到的问题。
- label: 我已经修改标题,将标题中的 **描述** 替换为我遇到的问题。
required: true
- type: input
id: version

View File

@@ -10,7 +10,7 @@
</p>
<p align="center">
<a href="https://www.autobangumi.org">官方网站</a> | <a href="https://www.autobangumi.org/deploy/quick-start.html">快速开始</a> | <a href="https://www.autobangumi.org/changelog/3.0.html">更新日志</a> | <a href="https://t.me/autobangumi">TG 群组</a>
<a href="https://www.autobangumi.org">官方网站</a> | <a href="https://www.autobangumi.org/deploy/quick-start.html">快速开始</a> | <a href="https://www.autobangumi.org/changelog/3.0.html">更新日志</a> | <a href="https://t.me/autobangumi_update">更新推送</a> | <a href="https://t.me/autobangumi">TG 群组</a>
</p>
# 项目说明
@@ -60,11 +60,6 @@
- 无需维护完全无感使用
- 内置 TDMB 解析器,可以直接生成完整的 TMDB 格式的文件以及番剧信息。
## 相关群组
- 更新推送:[Telegram Channel](https://t.me/autobangumi_update)
- Bug 反馈群:[Telegram](https://t.me/+yNisOnDGaX5jMTM9)
## [Roadmap](https://github.com/users/EstrellaXD/projects/2)

View File

@@ -24,6 +24,10 @@ class UserDatabase:
def auth_user(self, user: User):
statement = select(User).where(User.username == user.username)
result = self.session.exec(statement).first()
if not user.password:
return ResponseModel(
status_code=401, status=False, msg_en="Incorrect password format", msg_zh="密码格式不正确"
)
if not result:
return ResponseModel(
status_code=401, status=False, msg_en="User not found", msg_zh="用户不存在"