From 970c234d0831348e0fb36e86d796c1c30f751951 Mon Sep 17 00:00:00 2001 From: brbjr1 Date: Mon, 4 Dec 2017 18:44:32 -0600 Subject: [PATCH] Added rest method getOutputStatus --- octoprint_enclosure/__init__.py | 8 +------- setup.py | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/octoprint_enclosure/__init__.py b/octoprint_enclosure/__init__.py index 0759768..5d60bba 100644 --- a/octoprint_enclosure/__init__.py +++ b/octoprint_enclosure/__init__.py @@ -108,13 +108,7 @@ class EnclosurePlugin(octoprint.plugin.StartupPlugin, if getOutputStatusresult: getOutputStatusresult = getOutputStatusresult + ', ' getOutputStatusresult = getOutputStatusresult + '"' + str(pin) + '": ' + str(val).lower() - return '{' + getOutputStatusresult + '}' - - - @octoprint.plugin.BlueprintPlugin.route("/getTest", methods=["GET"]) - def getTest(self): - return flask.jsonify(success=True) - + return flask.jsonify('{' + getOutputStatusresult + '}') @octoprint.plugin.BlueprintPlugin.route("/getEnclosureTemperature", methods=["GET"]) def getEnclosureTemperature(self): diff --git a/setup.py b/setup.py index f74827c..059eac5 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ plugin_package = "octoprint_enclosure" plugin_name = "OctoPrint-Enclosure" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "3.52" +plugin_version = "3.51" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module