Skip to content

Commit 802d255

Browse files
committed
fix: 密码修改失败问题
1 parent 78c612c commit 802d255

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

apps/admin/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@admin_api.post('/login')
2020
async def login(data: LoginData):
2121
# 验证管理员密码
22-
if data.password != settings.admin_password:
22+
if data.password != settings.admin_token:
2323
raise HTTPException(status_code=401, detail="密码错误")
2424

2525
# 生成包含管理员身份的token

core/settings.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
'onedrive_root_path': 'filebox_storage',
3737
'onedrive_proxy': 0,
3838
'webdav_hostname': '',
39-
'webdav_username': '',
40-
'webdav_password': '',
4139
'webdav_root_path': 'filebox_storage',
4240
'webdav_proxy': 0,
4341
'admin_token': 'FileCodeBox2023',
@@ -71,9 +69,6 @@
7169
'port': 12345,
7270
'showAdminAddr': 0,
7371
'robotsText': 'User-agent: *\nDisallow: /',
74-
'jwt_secret_key': "your-secret-key", # 建议使用环境变量
75-
'jwt_algorithm': "HS256",
76-
'admin_password': 'FileCodeBox2023', # 建议使用环境变量存储
7772
}
7873

7974

0 commit comments

Comments
 (0)