()
| 76 | @api.route('/setup/internet', methods=['POST']) |
| 77 | @not_setup_only |
| 78 | def connect_internet(): |
| 79 | if "application/json" in request.headers["Content-Type"]: |
| 80 | data = request.json |
| 81 | if 'id' in data and 'password' in data: |
| 82 | result = networkManager().setWifiNetwork(data['id'], data['password']) |
| 83 | |
| 84 | if result: |
| 85 | return jsonify(result) |
| 86 | else: |
| 87 | return make_response("Network %s not found" % data['id'], 404) |
| 88 | |
| 89 | return make_response("Invalid Request", 400) |
| 90 | |
| 91 | @api.route('/setup/internet', methods=['PUT']) |
| 92 | @not_setup_only |
nothing calls this directly
no test coverage detected