/api/locations/redirects/
This commit is contained in:
parent
4803704cec
commit
88c14add23
1 changed files with 4 additions and 0 deletions
|
@ -153,6 +153,10 @@ class LocationViewSet(RetrieveModelMixin, GenericViewSet):
|
|||
def types(self, request):
|
||||
return MapdataViewSet.list_types(LOCATION_MODELS, geomtype=False)
|
||||
|
||||
@list_route(methods=['get'])
|
||||
def redirects(self, request):
|
||||
return Response([obj.serialize(include_type=False) for obj in LocationRedirect.objects.all().order_by('id')])
|
||||
|
||||
|
||||
class SourceViewSet(MapdataViewSet):
|
||||
queryset = Source.objects.all()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue