show route in frontend

This commit is contained in:
Laura Klünder 2017-11-28 12:32:46 +01:00
parent f34a31990d
commit a74f0fc1d4
3 changed files with 89 additions and 2 deletions

View file

@ -23,4 +23,10 @@ class RoutingViewSet(ViewSet):
destination=form.cleaned_data['destination'],
permissions=AccessPermission.get_for_request(request))
return Response(route.serialize(locations=visible_locations_for_request(request)))
return Response({
'request': {
'origin': form.cleaned_data['origin'].pk,
'destination': form.cleaned_data['destination'].pk,
},
'result': route.serialize(locations=visible_locations_for_request(request)),
})