We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86d51b5 commit bd8e630Copy full SHA for bd8e630
src/resources/wifi_routes.py
@@ -12,6 +12,10 @@ class wifi_connect(Resource):
12
def post(self):
13
content = request.get_json()
14
15
+ # If the device is already connected to a wifi network
16
+ if check_wifi_status():
17
+ return {'message': 'Device is already connected.'}, 409
18
+
19
# Check for any missing strings
20
if "conn_type" not in content or "ssid" not in content:
21
return {'message': 'Type or SSID not specified'}, 400
@@ -40,7 +44,7 @@ def get(self):
40
44
41
45
class wifi_forget(Resource):
42
46
def get(self):
43
- # If the device is already connected to a wifi network
47
+ # If the device is not connected to a wifi network
48
if not check_wifi_status():
49
return {'message': 'Device is already disconnected.'}, 409
50
0 commit comments