def update_users(id): body = request.get_json() user = User.update_single_user(body, id) if user.is_active and user.is_psychologist: user_psy = User_psychologist.update_psychologist_user(body, id) return jsonify(user_psy.to_dict()) if user.is_active and user.is_psychologist == False: user_comp = User_company.update_company_user(body, id) print(user_comp) return jsonify(user_comp.to_dict())
def update_company_user(id): body = request.get_json() user = User_company.update_company_user(body, id) change_user = User_company.get_by_id(id) return jsonify(change_user.to_dict())