This commit is contained in:
ada-dmitry
2023-08-22 16:22:13 +03:00
parent 713525aa38
commit 70da42077e
2 changed files with 1 additions and 6 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ def hello_world(): # put application's code here
@app.route('/create_game', methods=["POST"])
def create():
TCI = request.json['chatID']
curs = db.conn()
cursor = db.connection.cursor()
db.query_ins_chat(TCI, curs)
db.close(curs)
-5
View File
@@ -11,11 +11,6 @@ db_params = {
connection = psycopg2.connect(**db_params) # запускаем один раз
def conn(conn=connection):
cursor = conn.cursor()
return cursor
def query_ins_user(tui, curs=cursor):
try:
# Запрос добавления пользователя