Commit 6c29dba0 authored by Jonathan Hunt's avatar Jonathan Hunt

#53 Redirect conneg to new API endpoint.

parent 9f180143
......@@ -360,14 +360,14 @@ function climbnz_api_node_view($node, $view_mode, $langcode) {
if ($node->type == 'place') {
// Return via services, force path to be Place node.
//drupal_add_http_header('Vary', 'Accept', TRUE);
$_GET['q'] = 'api/place/' . $node->nid;
$_GET['q'] = 'api/places/' . $node->uuid;
$endpoint_name = 'climbnz_api1';
return services_endpoint_callback($endpoint_name);
}
if ($node->type == 'route') {
// Return via services, force path to be Route node.
//drupal_add_http_header('Vary', 'Accept', TRUE);
$_GET['q'] = 'api/route/' . $node->nid;
$_GET['q'] = 'api/routes/' . $node->uuid;
$endpoint_name = 'climbnz_api1';
return services_endpoint_callback($endpoint_name);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment