fix wifi location on javascript-side
This commit is contained in:
parent
9f75554503
commit
606ed3cc22
2 changed files with 1 additions and 2 deletions
|
@ -207,7 +207,6 @@ class LocationViewSet(ViewSet):
|
||||||
@list_route(methods=['POST'])
|
@list_route(methods=['POST'])
|
||||||
def wifilocate(self, request):
|
def wifilocate(self, request):
|
||||||
stations = json.loads(request.POST['stations'])[:200]
|
stations = json.loads(request.POST['stations'])[:200]
|
||||||
open('stations.json', 'w').write(repr(stations))
|
|
||||||
if not stations:
|
if not stations:
|
||||||
return Response({})
|
return Response({})
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ c3nav = {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: '/api/locations/wifilocate/',
|
url: '/api/locations/wifilocate/',
|
||||||
data: { stations: JSON.stringify(mobileclient.getNearbyStations()) },
|
data: { stations: mobileclient.getNearbyStations() },
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
location_group.removeClass('loading');
|
location_group.removeClass('loading');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue