add initil location api and javascript calls to it

This commit is contained in:
Laura Klünder 2017-12-24 04:37:05 +01:00
parent 8e90aa7e3c
commit 6805f2fb5f
3 changed files with 46 additions and 2 deletions

View file

@ -16,6 +16,7 @@ class RoutingViewSet(ViewSet):
"""
/route/ Get routes.
/options/ Get or set route options.
/locate/ Wifi locate.
"""
@list_route(methods=['get', 'post'])
def route(self, request, *args, **kwargs):
@ -76,3 +77,8 @@ class RoutingViewSet(ViewSet):
options.save()
return Response(options.serialize())
@list_route(methods=('POST', ))
def locate(self, request, *args, **kwargs):
# todo: implement wifi location
return Response({'location': None})