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'])
|
||||
def wifilocate(self, request):
|
||||
stations = json.loads(request.POST['stations'])[:200]
|
||||
open('stations.json', 'w').write(repr(stations))
|
||||
if not stations:
|
||||
return Response({})
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ c3nav = {
|
|||
$.ajax({
|
||||
type: "POST",
|
||||
url: '/api/locations/wifilocate/',
|
||||
data: { stations: JSON.stringify(mobileclient.getNearbyStations()) },
|
||||
data: { stations: mobileclient.getNearbyStations() },
|
||||
dataType: 'json',
|
||||
success: function(data) {
|
||||
location_group.removeClass('loading');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue