From 004944d46f3c2d430d1e8a48232a653a91d80f11 Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Fri, 24 Nov 2023 18:57:28 +0100 Subject: [PATCH] =?UTF-8?q?queue=20f=C3=BCr=20api=20derepariert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Website/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Website/__init__.py b/Website/__init__.py index 650b3d4..c6c1ab9 100644 --- a/Website/__init__.py +++ b/Website/__init__.py @@ -287,11 +287,11 @@ def create_app(test_config=None): leave_room(session[id]) #api - @app.route("/api/change", methods=['POST']) + @app.route("/api/change", methods=['GET']) def api_change(): db = get_db() c = db.cursor() - userid = request.form["id"] + userid = request.args.get("id") c.execute("SELECT * FROM users WHERE id=?", [userid]) user_list = c.fetchall() if user_list != []: @@ -311,13 +311,13 @@ def create_app(test_config=None): return make_response(json.dumps({"mode":"error","error":"043"})) - @app.route("/api/tag_id", methods=['POST']) + @app.route("/api/tag_id", methods=['GET']) def get_id(): global finished global message db = get_db() c = db.cursor() - tag_id = request.form["id"] + tag_id = request.args.get("id") c.execute(f"SELECT * FROM tags WHERE tagid=?", [tag_id]) tag_list = c.fetchall()