def update_user_skills(): data = request.get_json() user_id = database.get_user_id_from_email(current_user['email']) database.remove_all_user_skills(user_id) database.add_user_skills(user_id, data['skillIds']) return jsonify("SUCESS")
def update_user(): user_id = database.get_user_id_from_email(current_user['email']) database.edit_user(user_id, request.get_json()) return jsonify("SUCCESS")
def get_current_user_skills(): user_id = database.get_user_id_from_email(current_user['email']) skills = database.get_user_skills(user_id) return jsonify(skills)
def get_current_user(): user_id = database.get_user_id_from_email(current_user['email']) return get_user(user_id)