This commit is contained in:
Nicolás Sánchez 2024-12-19 16:25:52 -03:00
parent 8342923def
commit b540916a53
1 changed files with 2 additions and 2 deletions

View File

@ -1910,11 +1910,11 @@ def unwrapped_toggle_autoswitch(base,quote):
if x.config_dict["autoswitch"]: if x.config_dict["autoswitch"]:
broker.logger.log_this("Autoswitch turned OFF",1,f"{base}/{quote}") broker.logger.log_this("Autoswitch turned OFF",1,f"{base}/{quote}")
x.config_dict["autoswitch"] = False x.config_dict["autoswitch"] = False
return jsonify({"Success": "Autoswitch it's now OFF"}) return jsonify({"Success": "Autoswitch is now OFF"})
else: else:
broker.logger.log_this("Autoswitch turned ON",1,f"{base}/{quote}") broker.logger.log_this("Autoswitch turned ON",1,f"{base}/{quote}")
x.config_dict["autoswitch"] = True x.config_dict["autoswitch"] = True
return jsonify({"Success": "Autoswitch it's now ON"}) return jsonify({"Success": "Autoswitch is now ON"})
except Exception as e: except Exception as e:
broker.logger.log_this(f"Exception while toggling autoswitch: {e}",1,f"{base}{quote}") broker.logger.log_this(f"Exception while toggling autoswitch: {e}",1,f"{base}{quote}")
return jsonify({"Error": "Halp"}) return jsonify({"Error": "Halp"})