提交 7690343e 编写于 作者: H hjdhnx

完善了管理员操作界面

上级 ff03d664
......@@ -131,6 +131,12 @@ def admin_view_rule(name):
def admin_clear_rule(name):
if not name or not name.split('.')[-1] in ['js','txt','py','json']:
return jsonify(error.failed(f'非法猥亵,未指定文件名。必须包含js|txt|json|py'))
cookies = request.cookies
# print(cookies)
token = cookies.get('token', '')
# print(f'mytoken:{token}')
if not verfy_token(token):
return render_template('login.html')
file_path = os.path.abspath(f'js/{name}')
if not os.path.exists(file_path):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册