general fixes

This commit is contained in:
Patrick 2024-10-09 20:20:04 +02:00
parent 281d786c19
commit 885b838704
7 changed files with 66 additions and 23 deletions

View file

@ -108,7 +108,6 @@ class API:
@self.app.route("/interstellar_ai/db", methods=["POST"])
def db_manipulate():
sent_data = request.get_json()
print(sent_data)
action = sent_data.get("action")
if action == "create_account":
return jsonify({"status": 200, "response": self.db.add_user(sent_data)})
@ -161,7 +160,6 @@ class API:
unit_type = sent_data.get("unit_type")
city = sent_data.get("city")
weather_data = self.weather.getweather(unit_type, city)
print(type(weather_data))
return jsonify({"status": 200, "response": weather_data})
self.app.run(debug=True, host="0.0.0.0", port=5000)