Update public source
This commit is contained in:
+14
-14
@@ -3252,15 +3252,15 @@ def api_network_wifi_connect():
|
||||
"/api/wifi/channels"
|
||||
)
|
||||
def api_wifi_channels():
|
||||
|
||||
|
||||
interface = request.args.get(
|
||||
"interface",
|
||||
""
|
||||
).strip()
|
||||
|
||||
|
||||
|
||||
|
||||
if not interface:
|
||||
|
||||
|
||||
return jsonify(
|
||||
{
|
||||
"2.4": [],
|
||||
@@ -3269,15 +3269,15 @@ def api_wifi_channels():
|
||||
"error": "WiFi interface was not selected."
|
||||
}
|
||||
), 400
|
||||
|
||||
|
||||
|
||||
|
||||
interfaces, interface_error = (
|
||||
get_wifi_interfaces()
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
if interface_error:
|
||||
|
||||
|
||||
return jsonify(
|
||||
{
|
||||
"2.4": [],
|
||||
@@ -3286,10 +3286,10 @@ def api_wifi_channels():
|
||||
"error": interface_error
|
||||
}
|
||||
), 500
|
||||
|
||||
|
||||
|
||||
|
||||
if interface not in interfaces:
|
||||
|
||||
|
||||
return jsonify(
|
||||
{
|
||||
"2.4": [],
|
||||
@@ -3298,8 +3298,8 @@ def api_wifi_channels():
|
||||
"error": "Invalid WiFi interface."
|
||||
}
|
||||
), 400
|
||||
|
||||
|
||||
|
||||
|
||||
return jsonify(
|
||||
get_wifi_channels(interface)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user