show route in frontend
This commit is contained in:
parent
f34a31990d
commit
a74f0fc1d4
3 changed files with 89 additions and 2 deletions
|
@ -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)),
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue