@app.route('/user/<public_id>', methods=['GET'])
@cross_origin(supports_credentials=True)
@token_required
def get_one_user(current_user, public_id):
    user = User.query.filter_by(public_id=public_id).first()
    if (not user):
        return (jsonify({'message': 'Usuário não encontrado!'}), 400)
    user_data = {}
    user_data['public_id'] = user.public_id
    user_data['name'] = user.name
    user_data['cpf'] = user.cpf
    user_data['birthdate'] = user.birthdate
    user_data['gender'] = user.gender
    user_data['phone'] = user.phone
    user_data['email'] = user.email
    return (jsonify({'user': user_data}), 200)
@app.route('/user/<public_id>', methods=['GET'])
@cross_origin(supports_credentials=True)
@token_required
def get_one_user(current_user, public_id):
    user = User.query.filter_by(public_id=public_id).first()
    if (not user):
        return (jsonify({'message': 'Usuário não encontrado!'}), 400)
    user_data = {}
    user_data['public_id'] = user.public_id
    user_data['name'] = user.name
    user_data['cpf'] = user.cpf
    user_data['birthdate'] = user.birthdate
    user_data['gender'] = user.gender
    user_data['phone'] = user.phone
    user_data['email'] = user.email
    return (jsonify({'user': user_data}), 200)