Update public source
This commit is contained in:
+14
-14
@@ -3252,15 +3252,15 @@ def api_network_wifi_connect():
|
|||||||
"/api/wifi/channels"
|
"/api/wifi/channels"
|
||||||
)
|
)
|
||||||
def api_wifi_channels():
|
def api_wifi_channels():
|
||||||
|
|
||||||
interface = request.args.get(
|
interface = request.args.get(
|
||||||
"interface",
|
"interface",
|
||||||
""
|
""
|
||||||
).strip()
|
).strip()
|
||||||
|
|
||||||
|
|
||||||
if not interface:
|
if not interface:
|
||||||
|
|
||||||
return jsonify(
|
return jsonify(
|
||||||
{
|
{
|
||||||
"2.4": [],
|
"2.4": [],
|
||||||
@@ -3269,15 +3269,15 @@ def api_wifi_channels():
|
|||||||
"error": "WiFi interface was not selected."
|
"error": "WiFi interface was not selected."
|
||||||
}
|
}
|
||||||
), 400
|
), 400
|
||||||
|
|
||||||
|
|
||||||
interfaces, interface_error = (
|
interfaces, interface_error = (
|
||||||
get_wifi_interfaces()
|
get_wifi_interfaces()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if interface_error:
|
if interface_error:
|
||||||
|
|
||||||
return jsonify(
|
return jsonify(
|
||||||
{
|
{
|
||||||
"2.4": [],
|
"2.4": [],
|
||||||
@@ -3286,10 +3286,10 @@ def api_wifi_channels():
|
|||||||
"error": interface_error
|
"error": interface_error
|
||||||
}
|
}
|
||||||
), 500
|
), 500
|
||||||
|
|
||||||
|
|
||||||
if interface not in interfaces:
|
if interface not in interfaces:
|
||||||
|
|
||||||
return jsonify(
|
return jsonify(
|
||||||
{
|
{
|
||||||
"2.4": [],
|
"2.4": [],
|
||||||
@@ -3298,8 +3298,8 @@ def api_wifi_channels():
|
|||||||
"error": "Invalid WiFi interface."
|
"error": "Invalid WiFi interface."
|
||||||
}
|
}
|
||||||
), 400
|
), 400
|
||||||
|
|
||||||
|
|
||||||
return jsonify(
|
return jsonify(
|
||||||
get_wifi_channels(interface)
|
get_wifi_channels(interface)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -253,4 +253,3 @@ def main():
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -363,7 +363,7 @@ class CaptureParser:
|
|||||||
"country":
|
"country":
|
||||||
row[7],
|
row[7],
|
||||||
|
|
||||||
|
|
||||||
"vendor":
|
"vendor":
|
||||||
vendor,
|
vendor,
|
||||||
|
|
||||||
|
|||||||
@@ -275,4 +275,3 @@ class Session:
|
|||||||
|
|
||||||
|
|
||||||
self.gps_positions += 1
|
self.gps_positions += 1
|
||||||
|
|
||||||
|
|||||||
@@ -2729,4 +2729,3 @@ def import_wifitrip(
|
|||||||
)
|
)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
Reference in New Issue
Block a user