We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b3c524 commit 7b37269Copy full SHA for 7b37269
apps/admin/views.py
@@ -49,6 +49,10 @@ async def get_config():
49
50
@admin_api.patch('/config/update', dependencies=[Depends(admin_required)])
51
async def update_config(data: dict):
52
+ admin_token = data.get('admin_token')
53
+ if admin_token is None or admin_token == '':
54
+ return APIResponse(code=400, detail='管理员密码不能为空')
55
+
56
for k, v in data.items():
57
settings.__setattr__(k, v)
58
return APIResponse()
0 commit comments