Commit ec7f590e by 魏强

编辑用户接口,新增可以编辑用户权限;

parent b379f2d1
......@@ -35,6 +35,7 @@ def edit_user():
user_name = json_data['name'] if 'name' in json_data else 'SSW'
password = json_data['password'] if 'password' in json_data else ''
comment = json_data['comment'] if 'comment' in json_data else ''
level = json_data['level'] if 'level' in json_data else ''
spot_list = json_data['spot_list'] if 'spot_list' in json_data else []
if not old_phone:
return jsonify(BASE_RESPONSE(error_code=-1, error_message='old phone is null').to_dict())
......@@ -57,6 +58,9 @@ def edit_user():
agent_info.phone = new_phone
agent_info.comment = comment
if level:
agent_info.level = int(level)
if password:
salt = AgentService.gene_salt()
agent_info.salt_pwd = salt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment