<?php
function cass_shortcode_member_signedup_list_endpoint()
{
    register_rest_route('wp-cass/v1', '/cass-member-signedup/(?P<user_id>\d+)/(?P<race_id>\d+)', array(
            'methods' => 'GET',
            'callback' => 'get_api_cass_shortcode_member_signedup_list',
        )
    );
}

add_action('rest_api_init', 'cass_shortcode_member_signedup_list_endpoint');

function get_api_cass_shortcode_member_signedup_list($request)
{
    global $wpdb;
    $IDWPUser = intval($request->get_param('user_id'));
    $IDRace = intval($request->get_param('race_id'));

   return Race_User::selectOne($IDWPUser, $IDRace);   
}