예제 #1
0
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())
예제 #2
0
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())