fix: 修复管理员删除自己的bug

pull/45/head
梁浩 4 months ago
parent d590f380f8
commit bc2470c0e5

@ -183,7 +183,7 @@ def delete_user(user_id):
current_user_id = get_jwt_identity()
# 不能删除自己
if current_user_id = int(get_jwt_identity()):
if user_id == int(get_jwt_identity()):
return jsonify({'error': '不能删除自己的账户'}), 400
user = User.query.get(user_id)

Loading…
Cancel
Save