forked from bton/matekasse
queue für api derepariert
This commit is contained in:
parent
9f46bf5d39
commit
004944d46f
1 changed files with 4 additions and 4 deletions
|
@ -287,11 +287,11 @@ def create_app(test_config=None):
|
||||||
leave_room(session[id])
|
leave_room(session[id])
|
||||||
|
|
||||||
#api
|
#api
|
||||||
@app.route("/api/change", methods=['POST'])
|
@app.route("/api/change", methods=['GET'])
|
||||||
def api_change():
|
def api_change():
|
||||||
db = get_db()
|
db = get_db()
|
||||||
c = db.cursor()
|
c = db.cursor()
|
||||||
userid = request.form["id"]
|
userid = request.args.get("id")
|
||||||
c.execute("SELECT * FROM users WHERE id=?", [userid])
|
c.execute("SELECT * FROM users WHERE id=?", [userid])
|
||||||
user_list = c.fetchall()
|
user_list = c.fetchall()
|
||||||
if user_list != []:
|
if user_list != []:
|
||||||
|
@ -311,13 +311,13 @@ def create_app(test_config=None):
|
||||||
return make_response(json.dumps({"mode":"error","error":"043"}))
|
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():
|
def get_id():
|
||||||
global finished
|
global finished
|
||||||
global message
|
global message
|
||||||
db = get_db()
|
db = get_db()
|
||||||
c = db.cursor()
|
c = db.cursor()
|
||||||
tag_id = request.form["id"]
|
tag_id = request.args.get("id")
|
||||||
c.execute(f"SELECT * FROM tags WHERE tagid=?", [tag_id])
|
c.execute(f"SELECT * FROM tags WHERE tagid=?", [tag_id])
|
||||||
|
|
||||||
tag_list = c.fetchall()
|
tag_list = c.fetchall()
|
||||||
|
|
Loading…
Reference in a new issue