mirror of
https://github.com/IgorL123/mafia_api.git
synced 2026-09-24 07:30:15 +00:00
Merge branch 'main' into adada
This commit is contained in:
@@ -15,8 +15,8 @@ def action(): # put application's code here
|
|||||||
checkedUserID = data['CheckedUserID']
|
checkedUserID = data['CheckedUserID']
|
||||||
|
|
||||||
response = {
|
response = {
|
||||||
"killedUserId": "",
|
"killedUserId": None,
|
||||||
"isEndGame": "",
|
"isEndGame": None,
|
||||||
"checkedRole": False
|
"checkedRole": False
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,12 +40,12 @@ def action(): # put application's code here
|
|||||||
return jsonify(response), 200
|
return jsonify(response), 200
|
||||||
|
|
||||||
|
|
||||||
@app.route('/create_game', methods=["POST"])
|
@app.route('/create_chat', methods=["POST"])
|
||||||
def create():
|
def create():
|
||||||
TCI = request.json['chatID']
|
tci = request.json['chatID']
|
||||||
cursor = db.connection.cursor()
|
cursor = db.connection.cursor()
|
||||||
db.query_ins_chat(TCI, cursor)
|
db.query_ins_chat(tci, cursor)
|
||||||
db.close(cursor)
|
return 'ok', 200
|
||||||
|
|
||||||
|
|
||||||
@app.route('/start_game', methods=["POST"])
|
@app.route('/start_game', methods=["POST"])
|
||||||
@@ -60,5 +60,6 @@ def start(): # Команда принимает на вход
|
|||||||
return "", resp
|
return "", resp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run()
|
app.run(host="0.0.0.0", debug=True)
|
||||||
|
|||||||
@@ -51,3 +51,4 @@ def query_change(x):
|
|||||||
|
|
||||||
def close(cur):
|
def close(cur):
|
||||||
cur.close()
|
cur.close()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,5 +5,5 @@ Flask==2.3.2
|
|||||||
itsdangerous==2.1.2
|
itsdangerous==2.1.2
|
||||||
Jinja2==3.1.2
|
Jinja2==3.1.2
|
||||||
MarkupSafe==2.1.3
|
MarkupSafe==2.1.3
|
||||||
psycopg2==2.9.7
|
psycopg2-binary==2.9.7
|
||||||
Werkzeug==2.3.7
|
Werkzeug==2.3.7
|
||||||
|
|||||||
Reference in New Issue
Block a user