{
"code": "restx_logged_out",
"message": "Sorry, you must be logged in to make a request.",
"data": {
"status": 401
}
}
add_action('rest_api_init', function () {
register_rest_route('custom/v1', '/user', array(
'methods' => 'POST',
'permission_callback' => '__return_true',
'callback' => function (WP_REST_Request $Request) {
return $Request;
},
));
});